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, 08:33 PM
By michelle in forum VB Classic
Last Post: 06-28-2002, 08:22 AM
By Thomas Eyde in forum .NET
Last Post: 12-22-2001, 02:13 PM
By beth in forum VB Classic
Last Post: 10-05-2001, 12:19 PM
By Beth in forum VB Classic
Last Post: 10-05-2001, 10:34 AM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center