Dynamically Populate/DataBind BatchEdit RadComboBox

4 posts, 0 answers
  1. Pat
    Pat avatar
    31 posts
    Member since:
    Dec 2011

    Posted 01 Sep 2015 Link to this post

    A client of mine is looking for a grid that acts like excel, using the BatchEdit feature. The problem i'm running into is dynamically binding a ​RadComboBox based off data from ​within that row. i.e. Below, based off the DivisionID that is selected in the row i'm editing, i need to pull all teams that are in that division and databind the RadComboBox. any thoughts?:

     

    <telerik:RadGrid ID="gridData" runat="server" Skin="Telerik" OnNeedDataSource="NeedDataSource_Football"
        AutoGenerateColumns="false" AllowSorting="true" AllowFilteringByColumn="true" ShowHeader="true" ShowFooter="true" Width="100%"
         OnFilterCheckListItemsRequested="RadGrid1_FilterCheckListItemsRequested" FilterType="CheckList" GridLines="Both" AllowPaging="false">
        <GroupingSettings CaseSensitive="false" />
        <MasterTableView DataKeyNames="ID" CommandItemDisplay="Top" EditMode="Batch">
            <BatchEditingSettings EditType="Row" />
            <Columns>
                <telerik:GridBoundColumn DataField="FullName" SortExpression="FullName" HeaderText="Name" FilterCheckListEnableLoadOnDemand="true" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DivisionID" HeaderText="Division" FilterCheckListEnableLoadOnDemand="true"></telerik:GridBoundColumn>
                <telerik:GridTemplateColumn DataField="TeamID" HeaderText="Team" FilterCheckListEnableLoadOnDemand="true"
                    AllowFiltering="true" SortExpression="TeamID" AutoPostBackOnFilter="true" UniqueName="TeamID">
                    <ItemTemplate>
                        <%# DataBinder.Eval(Container.DataItem, "TeamName") %>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadComboBox ID="ddlTeams" runat="server" DataValueField="TeamID" DataTextField="TeamName"></telerik:RadComboBox>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>

  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2425 posts

    Posted 02 Sep 2015 Link to this post

    Hi Pat,

    Since the Batch editing is a client-side oriented edit mode and it generates only one editor for the entire column, the requirement that you have could not be achieved with the built-in functionality. Nevertheless, you could take a look at the following Code Library, where you will find a possible solution for simulating related RadComboBox controls (or populating values in the RadComboBox, based on a value from another column):
    Hope this helps.


    Regards,
    Konstantin Dikov
    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
  3. Pat
    Pat avatar
    31 posts
    Member since:
    Dec 2011

    Posted 08 Sep 2015 in reply to Konstantin Dikov Link to this post

    Thanks for the response Konstantin, 

     Is there anyway this could be a feature presented in a future release? I have a few clients that would love this type of functionality.

     - Pat

  4. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2425 posts

    Posted 11 Sep 2015 Link to this post

    Hello Pat,

    Currently there are no plans for integrating this as a built-in feature of Batch Editing, because this is a highly custom solution that handles the limitation of that edit mode. 

    Nevertheless, if you think that this will be a good addition to the Batch Editing, you can create a feature request item in our Ideas & Feedback Portal and if that item receives enough votes, our product manager and developers team could consider the possibility of such integration.


    Regards,
    Konstantin Dikov
    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