Hello,
I am working on a project with a RadGrid.
The user can select rows. However, there is a limit to the number of rows the user can select.
If the user selects more than the limit, a message pops-up telling the user about the limit. Then, all the rows surpassing the limit are unselected.
I have implement the JS function OnRowSelecting.
I have a problem when the user selects multiple rows with SHIFT, the above message shows on each row, surpassing the limit.
How can I catch the SHIFT-SELECT event, so I can pop-up the message only once, and not for each row?
Thank you,
Daniel.
I am working on a project with a RadGrid.
The user can select rows. However, there is a limit to the number of rows the user can select.
If the user selects more than the limit, a message pops-up telling the user about the limit. Then, all the rows surpassing the limit are unselected.
I have implement the JS function OnRowSelecting.
function
Row_Selecting(sender, args) {
var
grid = $find(
"<%=MyGrid2.ClientID%>"
);
var
masterTable = grid.get_masterTableView();
if
(masterTable.get_selectedItems().length >= MAX_NUMBER) {
alert("you reach the maximum number);
args.set_cancel(
true
);
}
}
I have a problem when the user selects multiple rows with SHIFT, the above message shows on each row, surpassing the limit.
How can I catch the SHIFT-SELECT event, so I can pop-up the message only once, and not for each row?
Thank you,
Daniel.