Hello everyone,
I used jquery to sort the grid, its working well, but I am getting a problem in saving it.
How can I save it according to priorities?
There is a column named priority in grid, I want to save the new priorities after sorting in the database, for example like if my grid is something like this, I will post the code too.
ID Title Priority
1 abc 1
2 xyz 2
3 pqr 3
Now if I sorted the grid and made the order of
2
3
1
Then how can I save it in the database so that the record with "ID 2" gets priority 1 then record with priority 3 gets priority 2 and so on for other records...
I want to do this on save button click.
I trid foreach
(gridview row in gridview.rows)
{
string abc = gridview1.rows[0].cells[2].tostring();
}
I'm getting 1 everytime in the string.
please help.