Hi!
I am trying to overcome a limitation in RadGrid (which I think is still around, I am using version 2010.1.309.35):
If AllowMultiRowSelection = true, and the user selects multiple rows by holding down the Shift-key, there is no postback even if
There is a workaround described here:
http://stackoverflow.com/questions/7424397/telerik-radgrid-onrowselected-events-all-done-event-for-multiple-selection/14381154#14381154
I have slightly modified the client code to look like this:
And it works fine. There is just one piece missing: How do I force a postback when the "last" row has been selected? Right now, all I do is an "alert('rows selected')", but I need to force a postback so that my server-side code can detect which rows are currently selected.
If it matters, I use an ASP.NET UpdatePanel to get partial updates.
Thanks!
/Fredrik
I am trying to overcome a limitation in RadGrid (which I think is still around, I am using version 2010.1.309.35):
If AllowMultiRowSelection = true, and the user selects multiple rows by holding down the Shift-key, there is no postback even if
EnablePostBackOnRowClick = true.
There is a workaround described here:
http://stackoverflow.com/questions/7424397/telerik-radgrid-onrowselected-events-all-done-event-for-multiple-selection/14381154#14381154
I have slightly modified the client code to look like this:
function IW_RowSelected(sender, eventArgs) {
var e = eventArgs.get_domEvent();
if (!sender.AllowMultiRowSelection || !e.shiftKey) {
// Multiple row not enabled or shift not pressed, nothing to do
return;
}
if (window.rowSelectedTimeout) {
// If selecting multiple rows, clear the previous row's rowSelectedTimeout
window.clearTimeout(window.rowSelectedTimeout);
}
rowSelectedTimeout = window.setTimeout(function() {
window.rowSelectedTimeout = null;
alert('rows selected'); // Should force a postback here
}, 10);
}
And it works fine. There is just one piece missing: How do I force a postback when the "last" row has been selected? Right now, all I do is an "alert('rows selected')", but I need to force a postback so that my server-side code can detect which rows are currently selected.
If it matters, I use an ASP.NET UpdatePanel to get partial updates.
Thanks!
/Fredrik