jQWidgets Forums

jQuery UI Widgets Forums Grid clearselection inside rowselect handler

This topic contains 2 replies, has 2 voices, and was last updated by  serge012374 11 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • clearselection inside rowselect handler #51220

    serge012374
    Participant

    Hello!

    I have a grid with selectionmode: ‘singlerow’. I also have a function that handles rowselect: $(“#grid”).on(‘rowselect’, function (event) { … }. I’d like it to clear selection when done handling rowselect. I tried $(“#grid”).jqxGrid(‘clearselection’) at the end of rowselect handler, but it doesn’t seem to work there. It works if I call it outside of rowselect handler. Is there any way to have the selection cleared at the end of rowselect handler?

    Thank you so much!

    Sergey


    Dimitar
    Participant

    Hello Sergey,

    Here is a workaround on the matter, using a timeout:

    $("#jqxgrid").on('rowselect', function (event) {
        setTimeout(function () {
            $('#jqxgrid').jqxGrid('clearselection');
        }, 100);
    });

    Best Regards,
    Dimitar

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


    serge012374
    Participant

    Thank you so much, Dimitar!

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

You must be logged in to reply to this topic.