T
Tim_k
The code below finds the user entered value in a textbox within a grid. Then it updates the value(s) to the bound datatable. But the value does not display after rebinding to the grid. I think it has something to do with the binding of the textbox? I'm not clear on whether I have to use DATABINDER.EVAL on each template or not.
Any suggestions?
Thanks,
Tim
For Each dgitem In dgQuery.Items
txt1 = CType(dgitem.FindControl("txtValues"), TextBox) 'Values textbox
Session("dtTable1").Rows(dgitem.ItemIndex).Item("txtValues") = txt1
Next
drTemp = Session("dtTable1").Rows(rowNum)
Session("dtTable1").Rows.Remove(drTemp)
Here's the html for the template textbox in my datagrid:
<asp:TemplateColumn HeaderText="Values">
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<asp:TextBox id="txtValues" runat="server" Width="217px" AutoPostBack="False" ToolTip="Enter Search Value(s)">
</asp:TextBox>
Any suggestions?
Thanks,
Tim
For Each dgitem In dgQuery.Items
txt1 = CType(dgitem.FindControl("txtValues"), TextBox) 'Values textbox
Session("dtTable1").Rows(dgitem.ItemIndex).Item("txtValues") = txt1
Next
drTemp = Session("dtTable1").Rows(rowNum)
Session("dtTable1").Rows.Remove(drTemp)
Here's the html for the template textbox in my datagrid:
<asp:TemplateColumn HeaderText="Values">
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<asp:TextBox id="txtValues" runat="server" Width="217px" AutoPostBack="False" ToolTip="Enter Search Value(s)">
</asp:TextBox>