Batch Edit change EditTemplate combo datasource

0 Answers 18 Views
Grid
Alex Dybenko
Top achievements
Rank 2
Alex Dybenko asked on 04 Mar 2024, 09:28 AM

Hi,

I have following grind in Batch Edit mode, is it possible to change cboKAC DataSourceID in code behind or JS? In other words - how to access controls on EditTemplate in Batch Edit mode?

Thanks,

Alex

<telerik:RadGrid ID="grdLinks" runat="server" AllowSorting="true" AllowPaging="false" Width="300px" Height="120px">
    <ClientSettings><Scrolling AllowScroll="true" /><Selecting AllowRowSelect="true" /></ClientSettings>
    <MasterTableView CommandItemDisplay="Top" AllowFilteringByColumn="false" AllowSorting="false" EditMode="Batch" EnableViewState="True" Width="100%" AutoGenerateColumns="false"
        CommandItemSettings-ShowCancelChangesButton="false" CommandItemSettings-ShowSaveChangesButton="false" CommandItemSettings-ShowRefreshButton="false"
        NoMasterRecordsText="" ShowHeader="false">
        <EditFormSettings EditFormType="AutoGenerated" EditColumn-ButtonType="PushButton" />
        <Columns>
            <telerik:GridTemplateColumn HeaderText="Task" HeaderStyle-Width="150px" DataField="lfaNum" UniqueName="lfaNum">
                <ItemTemplate>
                    <a target='_blank'  href='XXX.aspx?Num=<%# Eval("lfaNum")  %>'><%# Eval("lfaNum")  %></a>
                </ItemTemplate>
                <EditItemTemplate>
                    <telerik:RadComboBox ID="cboKAC" DataTextField="lfaNum" DataValueField="lfaID" DataSourceID="dsLFA"
                        DropDownAutoWidth="Enabled" Filter="Contains" runat="server"
                        EnableAutomaticLoadOnDemand="True" ItemsPerRequest="20" ShowMoreResultsBox="true" EnableVirtualScrolling="true" CausesValidation="false">
                    </telerik:RadComboBox>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridButtonColumn CommandName="Delete" Text="Delete" ButtonType="ImageButton" UniqueName="DeleteButton" HeaderStyle-Width="30px" />
        </Columns>
    </MasterTableView>        
</telerik:RadGrid>

 

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Alex Dybenko
Top achievements
Rank 2
Share this question
or