0

Probably already know the answer to this problem, but perhaps i am wrong.

My datagrid is being sorted by Id which is Autonumber.
So if i add a new entry its added at the bottom of the list.
Is there any way to change the sorting to a different nummeric column?

In my database i got a number column which of course if nummeric.
If 5 records got the number 1 in that column and a 6th is added with 1 it currently remains at the bottom.
Clicking the column will order them together, but this will order everything.
Basically its somewhat like adding a new entry in between other entries, instead of just adding a entry to the bottom.

2
Contributors
2
Replies
14
Views
4 Years
Discussion Span
Last Post by Sevyt
0

Your select statement for your datagridview can be edited to order by the column chosen.

For example:

"SELECT * FROM Table ORDER BY Column4 ASC"

Will sort data by column for ascending.

For decending just do the opposite:

"SELECT * FROM Table ORDER BY Column4 DESC"

Edited by Begginnerdev

0

Yeah i had something similar, i am guessing this is the only option to do it.

Column Asc/Desc has a odd way of doing it, it works though.

Just not the way you would want it when doing it with a numeric column.

Thanks

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.