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

Hot to access value of dynamically created controls in EditFormSettings.

1 Answer 88 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mukesh
Top achievements
Rank 1
Mukesh asked on 21 Dec 2015, 12:21 PM

Hi ,

Problem : I have problem statement in which i need to dynamically generate multiple textbox for edit.Number of textboxes depends on the number of tags read from xml file.I need to save the updated values into the xml again.

 

What I have done is as follows:

I am using RadGrid control.

When users click edit button ,On IteamDataboud event of radgrid I have read one hidden value field in EditFormSetting.Using this value I fetch record from xml and create Textboxs and display the value.When user is done with editing ,user press update button and Updateclick event fires.I am trying to access the dynamically created control values on clcik event but i guess these controls are not available due to Postback of page happen when update Button clicked.

I want to use the updated values of these dynamically generated controls.Can anyone please suggest me how to proceed?.

I am new to Asp.net

 

Thanks,

Mukesh

 

 

 

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 24 Dec 2015, 07:32 AM
Hi Mukesh,

You can use the UpdateCommand or ItemCommand event handlers provided by RadGrid:
http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/manual-crud-operations/defaultcs.aspx

And access the required controls and handle your custom logic to execute an update operation:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/rows/accessing-cells-and-rows#accessing-controls-in-editinsert-mode

I hope this will prove helpful.

Regards,
Eyup
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Mukesh
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or