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

[Solved] Grid EditItemTemplate and jQuery

1 Answer 142 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Eric Schoenholzer
Top achievements
Rank 2
Eric Schoenholzer asked on 09 Jan 2010, 12:22 AM
I would like attach a event to the textbox of the RadDateTimePricker in a EditItemTemplate by using jQuery.
There are two DateTimePicker, when I double click the textbox of the first picker, the value from the other picker should be copied..

Using the document ready event isn't possible, because the edit elements aren't available yet.
So my questions:
- Possible to use jQuery for that, or better from the server side?
- How to attach an event when the grid shows the elements later in the edit mode?
- How to find the elements?

Thanks
Eric

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 13 Jan 2010, 12:06 PM
Hello EricSch,

Thank you for contacting us and for your qustion.
The best option in this case would be to use the code-behind to reference the cell(s) which host the controls, and assign onclick/ondblclick event handlers to them. You can use the ItemDataBound event handler - it will be raised when the grid is put in edit mode.
Give this approach a try and let me know how it goes and if any other questions arise.

Greetings,
Yavor
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.
Tags
Grid
Asked by
Eric Schoenholzer
Top achievements
Rank 2
Answers by
Yavor
Telerik team
Share this question
or