This is a migrated thread and some comments may be shown as answers.

Rows selected by shift detection

3 Answers 101 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Erik
Top achievements
Rank 1
Erik asked on 19 Dec 2012, 08:54 AM
We upgraded our Telerik components from 2011.2 to 2012.3. We use the client side row selecting(ClientEvents.OnRowSelecting) and row selected(ClientEvents.OnRowSelected) events to let other components react on the row selection.

With the new components we have two problems by selecting rows with shift pressed:
1. the given DomEvent by the eventArgs only provides the property "CtrlKey" so we can not detect anymore if the row select events are triggers for a single row or for multiple rows(by shift pressed).
2. for the row which is clicked with shift pressed we want to know which cell was clicked by using the domEvent.scrElement or domEvent.target.

Can you help me with this to make it work as before?

3 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 24 Dec 2012, 06:03 AM
Hi Erik,

Thank you for contacting us.

It is difficult to understand your exact final goal from the provided information so far. Could you please elaborate on what you want to achieve so we can suggest a proper approach?

All the best,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Erik
Top achievements
Rank 1
answered on 28 Dec 2012, 08:28 AM
Hi Eyup,

We make difference in style between the selected rows and the active row. Currently the active row stays on the old position when we select rows by pressing shift key. We also use the sourceElement from the dom event to know which cell/column is click by shift click.

We want to know if the shift key is pressed(dom event) to use it in checks in the code. E.g. to decide how the row is selected, by click, ctrl click or shift click.

We can not let the grid behave the same as with the older Telerik components. We really appreciate if this properties are added to the dom event again on a shift press so the dom event is not a different object on ctrl click and shift click. Specially for the row which is click on a shift click.

Thanks for your time!
0
Eyup
Telerik team
answered on 03 Jan 2013, 07:31 AM
Hi Erik,

Thank you for getting back to us.

I have created a sample RadGrid web site to demonstrate how you can get the requested information. Please check out the attached application and let me know about the result.

All the best,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Erik
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Erik
Top achievements
Rank 1
Share this question
or