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

Populate DropDownList in DetailView based on parent row value

1 Answer 55 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Briken
Top achievements
Rank 1
Briken asked on 10 Nov 2015, 07:43 PM

    Hi,

    I have a hierarchical grid (MasterTable/GridTable views) where I want to populate a DropDownList, in child row (GridTable view), with the 'Operations' configured for the 'Area' value, in the parent row (MasterTable view), using Batch Edit mode. For example: If the operations configured for Warehouse Area are: Op1, Op2, Op3, I want to populate the DropDownList, in the child row (GridTableView), with these values when the Area value, in parent row (MasterTableView), is 'Warehouse'. There are several Areas with several Operations configured.

   Thanks.

    Best regards!

1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 13 Nov 2015, 12:20 PM
Hello,

If the hierarchy of the grid is with the default HierarchyLoadMode (ServerOnDemand) - the the child table has to be expanded first in order for the dropdownliad to be rendered on the page. Once the DropDownList has been rendered on the page you can find this on the client-side using the $find method from the ajax framework. Once you have a client-side reference to the DropDownList then you can modify its databinding and its items to be populated in the desired way. Depending on the choice of the databinding - you can either fire a server-side command to populate the dropdown or perform a client-side databinding with load on demand.
More information for the different databinding option in the dropdownlist control are available here:
http://docs.telerik.com/devtools/aspnet-ajax/controls/dropdownlist/databinding/overview
http://docs.telerik.com/devtools/aspnet-ajax/controls/dropdownlist/databinding/client-side-binding/binding-to-wcf

Also the editors in case of batch editing can be accessed in the way show in the following help article:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/data-editing/edit-mode/batch-editing/client-side-api

I hope this helps.

Regards,
Marin
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
Briken
Top achievements
Rank 1
Answers by
Marin
Telerik team
Share this question
or