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

How to get value from parent grid from custom edit form when in Add mode

1 Answer 174 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 02 Dec 2015, 08:15 PM
I have a custom edit form let's call it UserControlForm.ascx. When the user control form loads, I have a dropdown list that I need to pre-populate with data based on some other key values from another row(any row) on that grid(Grid1). I've seen the documentation on how to reference the edited row if the grid is in edit mode, but haven't found anything on how to get values from other rows.

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 07 Dec 2015, 03:52 PM
Hello Jeff,

I believe the following article will prove helpful for achieving this requirement:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/rows/accessing-cells-and-rows#accessing-controls-in-editinsert-mode

Once you access the UserControl within the ItemDataBound or PreRender event handler of the grid, you can access the combo inside using the FindControl method and apply any desired settings.

Hope this helps. Please give it a try and let me know if it works for you.

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
Jeff
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or