A
Ashutosh
Hi,
I have a table in which one column is declared as "laneID char(3)", but
it stores integer value. - This database was designed around 12 years
back...So, I don't know the reason for this & this can't be change under
any circumstances, no matter what.
Now, I am displaying the data of this table in a data grid view. So, for
sorting the data on this column, I changed the select command of the
adapter to
select laneID, lanename <some other columns also> from lanes order by
convert(int, laneID).
With this select query, lane IDs are sorted like integer. But when the
user clicks on the column header of laneID, the sort order is gone (it's
sorted like char) . How can I sort it in ascending and descending order
both, for/on this column treating them integers. I also need to allow
the users to sort data on other column in the usual way.
Thanks & Regards,
Ashutosh
I have a table in which one column is declared as "laneID char(3)", but
it stores integer value. - This database was designed around 12 years
back...So, I don't know the reason for this & this can't be change under
any circumstances, no matter what.
Now, I am displaying the data of this table in a data grid view. So, for
sorting the data on this column, I changed the select command of the
adapter to
select laneID, lanename <some other columns also> from lanes order by
convert(int, laneID).
With this select query, lane IDs are sorted like integer. But when the
user clicks on the column header of laneID, the sort order is gone (it's
sorted like char) . How can I sort it in ascending and descending order
both, for/on this column treating them integers. I also need to allow
the users to sort data on other column in the usual way.
Thanks & Regards,
Ashutosh