jQWidgets Forums

jQuery UI Widgets Forums Grid Moving row up and down

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 9 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Moving row up and down #78458

    chuonchuonot
    Participant

    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

    Moving row up and down #78463

    Peter Stoev
    Keymaster

    Hi chuonchuonot,

    We do not support rows moving. Rows Selection is also by bound index, not by visible index so you can have that in mind if you want to select through API. Each row has 2 indexes – visibleindex and boundindex. You can use “getboundindex” method to get the bound index of a given row object.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.