Hello all!
I have a problem with moving single row up and down on a JqxGrid with Asp.Net webform. I must use CHECKBOX selecting mode.
I store the data source in session (type List<custome object>) named “DataList” and selected rows is in session (type List<int>) named “SelectedRowIndex” on server.
When clicking on button Up or Down, I call Ajax to update its order and call updatebounddata to see the result after moving row. Please see at below pseudocode:
-On client side:
Button MovingUp click ->
function MovingUpRow(){
call Ajax “MovingRow()”;
call jqxGrid(updatebounddata);
btnHidenUpdateSelectedRow.click();
}
-On server side:
In webmethod MovingRow(): I update the order of session “DataList” and session selected row to adapt this case.
In method OnBtnHidenUpdateSelectedRowClick(), I transfer session selected index rows to client by method GetSelectedRow(SelectedRowIndex)
After that:
-On client side:
In method GetSelectedRow(SelectedRowIndex), I call jqxGrid(“selectrow”,SelectedRowIndex) to update selected row on grid:
However, the grid doesn’t update selected row as I expected.
Are there any solution for this case? I don’t know if my implementation is so complicated
. I just want to move row and update the selected row (increase or decrease 1 step respectively in case MovingUp or MovingDown)
Thank you in advance!
Best regards,
Phuc