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

[Solved] Nested Grid - Update Edit Form Textbox Client Side.

3 Answers 199 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Katie
Top achievements
Rank 1
Katie asked on 04 Jun 2009, 04:12 PM
I have a 2 level hierarchal grid. The 2nd level grid contains several template columns with radtextbox's. One of the columns is to capture a starting page number and another is to capture and ending page number.

When editing a row in the 2nd level grid I would like to copy the contents of the starting page number column to the ending page number column.

I assume i need to call a javascript function using the OnTextChanged event from the radtextbox for the Starting page number column, but I don't know how to access the starting page number and ending page number text box's from within the javascript function.

Thanks for your help.

3 Answers, 1 is accepted

Sort by
0
Katie
Top achievements
Rank 1
answered on 08 Jun 2009, 01:52 PM
0
Katie
Top achievements
Rank 1
answered on 08 Jun 2009, 05:11 PM
Unfortunately the solution didn't work as planned.

I call a javascript function using the OnBlur client
Using either the GetRegisteredServerElement or the GetGridServerElement  functions allows me get and update the input tags created by the RadTextBox server controls. I can copy the value from the Start page control to the End page control. But once the End page control has focus the value is removed.

I need to be able to access the RadTextbox control rather than the input tag so I can use the get_value() and set_value() functions.
0
Accepted
Sebastian
Telerik team
answered on 09 Jun 2009, 03:59 PM
Hello Jeff,

You can get access to the respective RadTextBox client objects directly inside their client event handlers (as they are passed as a first argument in them) and utilize the set_value()/get_value() method from their client API. Review the javascript code from this online demo for details:

http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandinput/defaultcs.aspx?product=grid

Kind regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Katie
Top achievements
Rank 1
Answers by
Katie
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or