jQWidgets Forums

jQuery UI Widgets Forums Grid jqxGrid – Grid Cells and Rows Selection (selectrow,unselectrow)

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

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

  • alanyeo
    Member

    Hi Dear All,          Good day. I encounter a problem or I’m not sure if I misused it. Appreciate if anyone can correct me. I have a JavaScript array that storing index position (number) of the rows that is selected. I’m trying to loop my array and make use $(‘#grid’).jqxGrid(‘unselectrow’, 10); to unselect the row in a JavaScript function (Note: I’m sure my $(‘#grid’) had initialized) by pressing a self-defined button, by right, it should unselect row, it works for the first click, but subsequently not working and my buttons are disappear. I seek your help and thank you very much once again.


    Peter Stoev
    Keymaster

    Hi,

    For selection, you can use the Grid’s API: jquery-grid-api.htm”. The ‘clearselection’ method clears the selection in the Grid. It is not necessary to create a loop. In addition, you do not have to store the selected indexes, because the Grid does that, too. The ‘getselectedrowindexes’ returns an array with the indexes of the selected rows.

    var rowindexes = $(‘#jqxGrid’).jqxGrid(‘getselectedrowindexes’);

    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.