When i am sorting a datagrid, the cursor follow increment and the datarow isn't the correct, a mistake.
How I can allow to sort the datagrid and that it continues agreeing with the cursor.
Saludos
Victor (Madrid - Spain)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I assume you are binding the resultset to a datagrid, and allowing the user to sort it by clicking on column headers?
If so you need to have a way of linking the row of the datagrid to the row of the dataset, as the cursor works off the dataset row number, not a bound datagrids row number.
I have bound datagrids in my applications, but haven't linked the current row number back to a cursor position. As a suggestion you might want to try adding a hidden column containing the original row number and use that to position the cursor.
- Richard.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When i am sorting a datagrid, the cursor follow increment and the datarow isn't the correct, a mistake.
How I can allow to sort the datagrid and that it continues agreeing with the cursor.
Saludos
Victor (Madrid - Spain)
Hi Victor,
I assume you are binding the resultset to a datagrid, and allowing the user to sort it by clicking on column headers?
If so you need to have a way of linking the row of the datagrid to the row of the dataset, as the cursor works off the dataset row number, not a bound datagrids row number.
I have bound datagrids in my applications, but haven't linked the current row number back to a cursor position. As a suggestion you might want to try adding a hidden column containing the original row number and use that to position the cursor.
- Richard.
Thank,
hidden colummn is the solution