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

Accessing textbox's value in edit template using Javascript

2 Answers 113 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Izik
Top achievements
Rank 1
Izik asked on 12 Sep 2010, 06:00 PM
Hello,
I'm using the radgrid's templated edit mode,
in the template there is a button which opens a radwindow (in javascript) and passes the text from a textbox (which is also inside the edit template) to that radwindow.
and eventually when a button in the radwindow is clicked, the radwindow gets closed and updates the text inside that textbox.

Everything is done without posting back to the server.

my only problem is reading/writing from that textbox inside the templated edit form.

Any suggestions?

Thanks,

Izik

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 13 Sep 2010, 07:29 AM
Hello,


Here is the possible solution I tried once.

  • Access the button and textbox from code behind in ItemCreated event.
  • Attach onclick client event to button by passing the textbox ClientID.
  • In the event handler, open the window using any of the method described in the docuementaion, save the ClientID in global variable.
  • When closing the window, access the textbox using the ClientID and set the value accordingly.


Thanks,
Princy.

0
Izik
Top achievements
Rank 1
answered on 13 Sep 2010, 05:21 PM
Thank you it worked perfectly!

Izik
Tags
Grid
Asked by
Izik
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Izik
Top achievements
Rank 1
Share this question
or