jQWidgets Forums

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts

  • tkujawa
    Participant

    Hi Peter,

    thanks for your quick response! That’s a pity, but maybe I can build a little workaround for my case. I wrote the following to select a row respectively multiple rows if clicked the checkbox in my first column:

    $('#myGrid').on('cellendedit', function (event) {
        var args = event.args;
    
        if ( args.datafield == "Selected" ) {
            if ( args.value == true ) {
    
                // Select row - Grid Core
                $('#myGrid').jqxGrid('selectrow', args.rowindex);
    
                var selectedRows = $('#myGrid').jqxGrid('getselectedrowindexes');
    
                // Select rows - UI
                _.each(selectedRows, function(value) {
    
                   $('#myGrid').find('#row' + value + 'table-widget').find('.jqx-grid-cell').addClass('jqx-grid-cell-selected jqx-fill-state-pressed');
    
                });
    
            } else {
                // Nothing for the moment
            }
        }
    
    });

    The table still has selectionmode: 'multiplecellsadvanced' and this code works very well, but if I scroll or clicking somewhere else in the grid, the selection disappears and I don’t know which event is fired in this case. Could you please tell me the events or explain what’s happening on these actions? I feel pretty close to a passable workaround solution 🙂

    Thanks and regards,
    Timo

Viewing 1 post (of 1 total)