Selected row

Selected row

Andreas S.Andreas S. Posts: 190Questions: 68Answers: 4

I use this script to enable some buttons if a row is selected:

        ulist.on('select', function () {
            var selectedRows = ulist.rows( { selected: true } ).count();
            ulist.button( 1 ).enable( selectedRows === 1 );
            ulist.button( 2 ).enable( selectedRows === 1 );
            ulist.button( 3 ).enable( selectedRows === 1 );

If the Page with the Table is new loaded, the Button are disabled. If I select a row the buttons are enabled.
I deselect the row, the buttons should now disabled again, but the Button are enabled and create an error if
you click on the Button without selection. How can I disable the button if the user have deselected all rows?


This question has an accepted answers - jump to answer


This discussion has been closed.