Sorting a datagrid view by column NUMERICALLY,decending, progrmatically-vb 2005 expre
Can you help me please?
I have an unbound datagridview (DGV2) which I want to sort by
the numeric value of column 2 in decending order so that "10"
comes before "5". A normal descending sort treats them as
strings and put "5" before "10".
I would be grateful for any help.
Why don't you make sure to change the column data type to number or integer.
That will allow the sort to be proper.
How do I do that?
Thanks for the info, it sounds good. Unfortuately I am new to vb.net, how do I that?
What database are you using?
If it is access, then open the Access database and the table that is used in the query.
You should then switch to Design view.
By looking at the column, you can tell what data type it is.
Usually, you will see (Text, Autonumber, Memo, etc)
If the data column is Text then you may need to change that to Number.
Does this help?
By Cab_0001 in forum ASP.NET
Last Post: 01-18-2007, 09:33 PM
By michelle in forum VB Classic
Last Post: 06-28-2002, 09:22 AM
By Thomas Eyde in forum .NET
Last Post: 12-22-2001, 03:13 PM
By beth in forum VB Classic
Last Post: 10-05-2001, 01:19 PM
By Beth in forum VB Classic
Last Post: 10-05-2001, 11:34 AM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL