0
一個GridTemplateColumn我有兩個GridTemplateColumn(一個或多個),每個包含一個radcombobox控件。當左組合框OnSelectedIndexChanged事件觸發,我需要根據左邊的新值重新填充正確的組合框。我似乎無法在的FindControl從事件的任何方式。如何找到radcombobox控件從不同GridTemplateColumn radcombobox控件OnSelectedIndexChanged事件
<telerik:GridTemplateColumn HeaderText="CAKE Verticals" ItemStyle-Width="100px">
<ItemTemplate>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadComboBox runat="server" ID="RadComboBox_CakeVerticals" EnableLoadOnDemand="True"
OnItemsRequested="RadComboBox_CakeVerticals_ItemsRequested" AutoPostBack="true"
HighlightTemplatedItems="true" Height="140px" Width="220px" DropDownWidth="420px"
OnSelectedIndexChanged="RadComboBox_CakeVerticals_OnSelectedIndexChangedHandler">
</telerik:RadComboBox>
</EditItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="CakeColumns" HeaderText="CakeColumns" ItemStyle-Width="100px">
<ItemTemplate>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadComboBox runat="server" ID="RadComboBox_CakeColumns" EnableLoadOnDemand="True"
OnItemsRequested="RadComboBox_CakeColumns_ItemsRequested" AutoPostBack="true"
HighlightTemplatedItems="true" Height="140px" Width="220px" DropDownWidth="420px"
OnSelectedIndexChanged="RadComboBox_CakeColumns_OnSelectedIndexChangedHandler">
</telerik:RadComboBox>
</EditItemTemplate>
</telerik:GridTemplateColumn>
,並在CS
protected void RadComboBox_CakeVerticals_OnSelectedIndexChangedHandler(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
RadComboBox combobox = (RadComboBox)RadGrid_Columns.FindControl("RadComboBox_CakeColumns");
Session["verticalID"] = e.Value;
RCB_CAKE_Columns_Populate(e.Value, combobox);
}
問題是,組合框始終爲空。