I have an "OnRowSelected" event that I use to process the state of a bunch of controls on my grid. The event fires when a user clicks on a row or [ctrl]-clicks on a row. I noticed that when the user drags to select multiple rows or [shift]-clicks to select multiple rows the "OnRowSelected" event doesn't fire.
Does anyone know how I can force the OnRowSelected event to fire when the user selects multiple rows as by dragging to select or by holding [shift} and selecting?
Thanks!
Does anyone know how I can force the OnRowSelected event to fire when the user selects multiple rows as by dragging to select or by holding [shift} and selecting?
Thanks!
3 Answers, 1 is accepted
0
Hi Richard,
I just tested this and the OnRowSelected event handler is correctly fired for each selected row, regardless of the method of selection (shift-click, drag to select etc.). Can you specify which version of the controls you are using and elaborate a bit on your Grid settings?
Best wishes,
Pavel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
I just tested this and the OnRowSelected event handler is correctly fired for each selected row, regardless of the method of selection (shift-click, drag to select etc.). Can you specify which version of the controls you are using and elaborate a bit on your Grid settings?
Best wishes,
Pavel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Richard
Top achievements
Rank 2
answered on 27 Jan 2010, 03:42 PM
Hi Pavel. Thanks for your reply.
Here is the information you requested:
Controls Version: 2009.3.1208.35
Here is my Grid design: As I had mentioned, the [shift]-select and DragToSelect events don't seem to fire my OnRowSelected event. I'd appreciate any insight you might have to offer.
Here is the information you requested:
Controls Version: 2009.3.1208.35
Here is my Grid design: As I had mentioned, the [shift]-select and DragToSelect events don't seem to fire my OnRowSelected event. I'd appreciate any insight you might have to offer.
| <telerik:RadGrid ID="RadGrid1" runat="server" Width="100%" Height="100%" DataSourceID="odsRecords" |
| AllowPaging="true" PagerStyle-AlwaysVisible="true" OnPageIndexChanged="RadGrid1_PageIndexChanged" |
| OnPageSizeChanged="RadGrid1_PageSizeChanged" AllowSorting="true" OnSortCommand="RadGrid1_SortCommand" |
| OnLoad="RadGrid1_Load" OnItemDataBound="RadGrid1_ItemDataBound" AllowMultiRowSelection="true" |
| OnItemCreated="RadGrid1_ItemCreated" OnItemCommand="RadGrid1_ItemCommand" OnColumnCreated="RadGrid1_ColumnCreated"> |
| <ItemStyle Wrap="False"></ItemStyle> |
| <HeaderStyle Wrap="True"></HeaderStyle> |
| <PagerStyle Height="28px" Mode="NumericPages" Position="Bottom"></PagerStyle> |
| <FooterStyle Font-Bold="true" /> |
| <MasterTableView DataSourceID="odsRecords" CanRetrieveAllData="False" AllowCustomPaging="true" |
| AllowCustomSorting="true"> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <Columns> |
| </Columns> |
| </MasterTableView> |
| <ClientSettings> |
| <ClientEvents OnRowSelected="GridRowSelected" /> |
| <Scrolling AllowScroll="True" UseStaticHeaders="True" /> |
| <Selecting AllowRowSelect="true" EnableDragToSelectRows="true" /> |
| <Resizing AllowColumnResize="True" EnableRealTimeResize="True" ClipCellContentOnResize="false" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
0
Hi Richard,
I used your settings in a sample test page, but could not reproduce the problem and it seems that the OnRowSelected event is executed as expected. Could you take a look at the attached sample and let me know if you can replicate the problem with it and how to modify the code to make the problem appear?
All the best,
Pavel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
I used your settings in a sample test page, but could not reproduce the problem and it seems that the OnRowSelected event is executed as expected. Could you take a look at the attached sample and let me know if you can replicate the problem with it and how to modify the code to make the problem appear?
All the best,
Pavel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.