Hello
Can you help me ?!
I've a grid with a textbox and a combobox
With editing (InPlace), i want to rebind the combox with new data depending on textbox value
<Grid......
1er Column
<telerik:GridTemplateColumn UniqueName="Dep" DataField="Dep" HeaderText="Dept" AllowFiltering="false">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Dep")%>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadNumericTextBox ID="ntbDept" DataType="System.Integer" runat="server" Width="100%" AutoPostBack="true" ></telerik:RadNumericTextBox>
</EditItemTemplate>
/telerik:GridTemplateColumn>
2 Colum
<telerik:GridTemplateColumn UniqueName="NomCommune" DataField="NomComInsee" HeaderText="Commune" AllowFiltering="false">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "NomComInsee")%>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadComboBox ID="cbCommune" runat="server" Width="90%" DropDownWidth="400" MarkFirstMatch="True" Filter="StartsWith"> </telerik:RadComboBox>
</EditItemTemplate>
<HeaderStyle Width="40%" />
</telerik:GridTemplateColumn>
And the code behind
On my grid ItemDataBound ....
dim dt as new datatable
...fill dt with sqladpter (depending on NomCommune) .... That OK
Dim cbCommune As RadComboBox = DirectCast(item.FindControl("cbCommune"), RadComboBox)
cbCommune.DataSource = dt
cbCommune.DataValueField = "CInsee"
cbCommune.DataTextField = "NomCom"
cbCommune.DataBind()
cbCommune is OK but the combobox in the grid is not updated
PLEASE HELP ME
Thank a lot
Anne
Can you help me ?!
I've a grid with a textbox and a combobox
With editing (InPlace), i want to rebind the combox with new data depending on textbox value
<Grid......
1er Column
<telerik:GridTemplateColumn UniqueName="Dep" DataField="Dep" HeaderText="Dept" AllowFiltering="false">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Dep")%>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadNumericTextBox ID="ntbDept" DataType="System.Integer" runat="server" Width="100%" AutoPostBack="true" ></telerik:RadNumericTextBox>
</EditItemTemplate>
/telerik:GridTemplateColumn>
2 Colum
<telerik:GridTemplateColumn UniqueName="NomCommune" DataField="NomComInsee" HeaderText="Commune" AllowFiltering="false">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "NomComInsee")%>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadComboBox ID="cbCommune" runat="server" Width="90%" DropDownWidth="400" MarkFirstMatch="True" Filter="StartsWith"> </telerik:RadComboBox>
</EditItemTemplate>
<HeaderStyle Width="40%" />
</telerik:GridTemplateColumn>
And the code behind
On my grid ItemDataBound ....
dim dt as new datatable
...fill dt with sqladpter (depending on NomCommune) .... That OK
Dim cbCommune As RadComboBox = DirectCast(item.FindControl("cbCommune"), RadComboBox)
cbCommune.DataSource = dt
cbCommune.DataValueField = "CInsee"
cbCommune.DataTextField = "NomCom"
cbCommune.DataBind()
cbCommune is OK but the combobox in the grid is not updated
PLEASE HELP ME
Thank a lot
Anne