jQWidgets Forums
Forum Replies Created
-
Author
-
Solved:
The events “rowselect” and “rowunselect” does not really work as expected:
rowselect fires
1. When a row is selected
2. When all rows are selected by clicking the “select-all-checkbox”
3. When all rows are UNselected by clicking the “select-all-checkbox”.rowunselect fires
1. When a row is unselected
Note: rowunselect does NOT fire when all rows are unselected using the “select-all-checkbox”.Solution (using an un-documented feature):
In the case “rowselect” was fired when clicking the “select-all-chenbox” the event-argument event.args.rowindex of the handler holds an array of indexes to the selected rows. i.e. an array of all indexes OR an empty array. By checking the length of the array you will know!Example:
$("#theGrid").bind('rowselect', function (event) { if (Array.isArray(event.args.rowindex)) { if (event.args.rowindex.length > 0) { alert("All rows selected"); } else { alert("All rows unselected"); } } else { alert("Selected row has index = " + event.args.rowindex); } }); $("#theGrid").bind('rowunselect', function (event) { alert("Unselected row has index = " + event.args.rowindex); });
Any ideas on how to implement the “unselect all”-event? The rowunselect-event does not fire when unselecting all rows by clicking the header-checkbox.
Thanks in advance // Henrik
January 6, 2017 at 10:10 am in reply to: Difference between 'refreshdata' and 'updatebounddata'? Difference between 'refreshdata' and 'updatebounddata'? #90364Bump, Peter!
I would also like a better description of the differences between refreshdata and updatebounddata.
What does bound actually stand for in this case?
Kind regards
// Henrik -
AuthorPosts