Hey All,
I have an editable column in a datagrid called DG_Combo which I declare like this:
<asp:TemplateColumn HeaderText="Technician">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<ItemTemplate>
<asp:Label id=lblTechnician Text='<%# DataBinder.Eval(Container.DataItem, "Technician"
%>' Runat="server">
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox runat="server" id="hdnEquipID" Visible=False Text='<%# DataBinder.Eval(Container.DataItem, "EquipStatID"
%>'/>
<asp:Label ID="lblTempTechnician" Text='<%# DataBinder.Eval(Container.DataItem, "Technician"
%>' Runat="server" />
<asp
ropDownList id="cboTechnician" DataTextField="Name" DataValueField="Name" runat="server" OnSelectedIndexChanged="PopulateNextCombo" />
</EditItemTemplate>
</asp:TemplateColumn>
On the update command I find the control doing this:
Dim cboTechnician As DropDownList = CType(e.Item.FindControl("cboTechnician"
, DropDownList)
and then find out what the text value of the control is by cboTechnician.SelectedItem.Text
It continues to hold onto the same name no matter how I play with the code. It doesn't capture the correct name even on load - I don't understand what is happening since this code has worked fine in other areas of the app..?? Anyone got any ideas?
I have an editable column in a datagrid called DG_Combo which I declare like this:
<asp:TemplateColumn HeaderText="Technician">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<ItemTemplate>
<asp:Label id=lblTechnician Text='<%# DataBinder.Eval(Container.DataItem, "Technician"
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox runat="server" id="hdnEquipID" Visible=False Text='<%# DataBinder.Eval(Container.DataItem, "EquipStatID"
<asp:Label ID="lblTempTechnician" Text='<%# DataBinder.Eval(Container.DataItem, "Technician"
<asp
</EditItemTemplate>
</asp:TemplateColumn>
On the update command I find the control doing this:
Dim cboTechnician As DropDownList = CType(e.Item.FindControl("cboTechnician"
and then find out what the text value of the control is by cboTechnician.SelectedItem.Text
It continues to hold onto the same name no matter how I play with the code. It doesn't capture the correct name even on load - I don't understand what is happening since this code has worked fine in other areas of the app..?? Anyone got any ideas?