So i am trying to use a data grid for displaying / updating information. However some of the fields are going to be combo boxes where they will choose their items. Because of this as i understand on the RowEditing event i will have to select the value and on the RowUpdating i will manually update my table and just do a post back for refresh. However when i try to use the
CType(gvResults.FindContro
l("txtIfat
Other"), TextBox).Text
where txtIfatOther is the name of my text box it keeps giving me nullreferenceexception.
I have looked at several examples out there and nothing really seems to be guiding me towards the light. So if anyone knows of how to reference a control in in a datagrid i would love to hear how it is done.
Also not sure if it makes a difference but here is how my gridview column is set up
<asp:TemplateField HeaderText="IFAT Other" >
<EditItemTemplate>
<asp:TextBox ID="txtIfatOther" runat="server" MaxLength="100" />
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblIfatOther" runat="server" />
</ItemTemplate>
</asp:TemplateField>
Start Free Trial