G
Guest
Hi,
I have the foll template field
<asp:TemplateField HeaderText="Quantity" ItemStyle-HorizontalAlign="center">
<ItemTemplate>
<%# Eval("quantity") %>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtQty" runat="server" Width="29"
Height="13" Text='<%# Eval("quantity") %>'></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
I am able to read the EditItem by this
..Quantity = CType(r.Cells(e.RowIndex).FindControl("txtQty"), TextBox).Text
but when I try to read from the ItemTemplate like this
..Quantity = r.Cells(9).Text
I get Null or empty value. Please advice.
Thanks
I have the foll template field
<asp:TemplateField HeaderText="Quantity" ItemStyle-HorizontalAlign="center">
<ItemTemplate>
<%# Eval("quantity") %>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtQty" runat="server" Width="29"
Height="13" Text='<%# Eval("quantity") %>'></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
I am able to read the EditItem by this
..Quantity = CType(r.Cells(e.RowIndex).FindControl("txtQty"), TextBox).Text
but when I try to read from the ItemTemplate like this
..Quantity = r.Cells(9).Text
I get Null or empty value. Please advice.
Thanks