jQuery UI Widgets Forums Grid Grid column chooser event

This topic contains 1 reply, has 2 voices, and was last updated by  Yavor Dashev 2 months, 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Grid column chooser event #115003

    Stranger
    Participant

    Hello,

    I want to do some actions after columns was shown\hidden by using column chooser. Is there any event fires after I check\uncheck checkboxes in column chooser pop-up window and click “OK” or can it be implemented somehow in other way?

    Thanks in advance.

    Grid column chooser event #115008

    Yavor Dashev
    Participant

    Hi Stranger,

    You can implement this by using the default functionality of the checkbox.
    I have prepared a little code snippet on how to achieve this:

    
     $("#openButton").on('click', function () {
                    $("#grid").jqxGrid('openColumnChooser');
                  
                    setTimeout(  function(){
                        $(".jqx-listbox").jqxListBox()
                        $(".jqx-listbox").on('checkChange', function (event) {
                        var args = event.args;
                        if (args.checked) {
                          alert('checked')
                        }
                        else {
                           alert('not checked')
                        }
                    })}, 300)
                });
    

    One thing to note here is that the setTimeout is necessary because when you open the columnChooser the listbox elements are not in the DOM.

    Please, do not hesitate to contact us if you have any additional questions.

    Best Regards,
    Yavor Dashev
    jQWidgets team
    https://www.jqwidgets.com

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

You must be logged in to reply to this topic.