Hi all,
I have created a datagrid in a window form. The datagrid
can display the data from the database perfectly. But if
I have clicked the top rows, which means row containing the
coulmns name, the rows would be sorted by that column asc
or desc.
But when I get the value of a cell, the value still is
the value before sorting. For example,
row 1 : 1 a b c 3
row 2 : 2 g h e f
after I sort the table by clicking the column name.
it becomes :
row 1 : 2 g h e f
row 2 : 1 a b c 3
But when I clicked the cell (row 2 and column 1 ), the
returned value is 2 , not 1
I want to ask how I can get the correct value after sorting.
Thx
SP
I have created a datagrid in a window form. The datagrid
can display the data from the database perfectly. But if
I have clicked the top rows, which means row containing the
coulmns name, the rows would be sorted by that column asc
or desc.
But when I get the value of a cell, the value still is
the value before sorting. For example,
row 1 : 1 a b c 3
row 2 : 2 g h e f
after I sort the table by clicking the column name.
it becomes :
row 1 : 2 g h e f
row 2 : 1 a b c 3
But when I clicked the cell (row 2 and column 1 ), the
returned value is 2 , not 1
I want to ask how I can get the correct value after sorting.
Thx
SP