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

Dynamically Populate/DataBind BatchEdit RadComboBox

3 Answers 45 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pat
Top achievements
Rank 1
Pat asked on 01 Sep 2015, 08:54 PM

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>

3 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 02 Sep 2015, 02:12 PM
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
0
Pat
Top achievements
Rank 1
answered on 08 Sep 2015, 10:24 PM

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

0
Konstantin Dikov
Telerik team
answered on 11 Sep 2015, 10:34 AM
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
Tags
Grid
Asked by
Pat
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Pat
Top achievements
Rank 1
Share this question
or