Populate DropDownList in DetailView based on parent row value

2 posts, 0 answers
  1. Briken
    Briken avatar
    1 posts
    Member since:
    Jan 2011

    Posted 10 Nov 2015 Link to this post

        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!

  2. Marin
    Admin
    Marin avatar
    1057 posts

    Posted 13 Nov 2015 Link to this post

    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
Back to Top