i have 2 - template coloumns in the datagrid . one with textbox & the other with label as given below. i have to copy the value of the textbox column to the column coressoponding label row.
<asp:DataGrid ID="dgIndent" runat="Server" AutoGenerateColumns="False" Font-Bold="False" Font-Italic="False" Font-Names="Arial" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" Width="100%"> <Columns> <asp:BoundColumn DataField="indentdet_ItemCode" HeaderText="Item Code"> <HeaderStyle HorizontalAlign="Center" /> <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" /> </asp:BoundColumn> <asp:BoundColumn DataField="Item_description" HeaderText="Item Name"> <HeaderStyle HorizontalAlign="Center" /> <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" /> </asp:BoundColumn> <asp:TemplateColumn HeaderText="Auth. Qty"> <ItemTemplate> <%--<asp:TextBox ID="txtAuthQty" runat="server" Width="56px" Text ='<%# DataBinder.Eval(Container.DataItem, "qty").ToString() %>'></asp:TextBox>--%> <input type="text" name="txtQty" onchange ="GetTotal(this,'txtQty','lblAuthQty')"> </ItemTemplate> </asp:TemplateColumn> <asp:TemplateColumn HeaderText="Qty"> <ItemTemplate> <asp:Label ID="lblAuthQty" runat="server" Width="56px" Text ='<%# DataBinder.Eval(Container.DataItem, "qty").ToString() %>'></asp:label> <%-- <input type="text" name="txtQty" onclick="GetTotal(this,'dgIndent')">--%> </ItemTemplate> </asp:TemplateColumn> </Columns> <HeaderStyle BackColor="#CCCCFF" Font-Bold="True" Font-Italic="False" Font-Names="Arial" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" /> </asp:DataGrid>
|
| Author: vipul 08 Sep 2008 | Member Level: Diamond | Rating: Points: 2 |
Hi, From your code i understand you want to copy text value to label but my question is how? means there is no button so how you pass the value.
vipul, http://dongavipul.blogspot.com
Patel Vipul Web Developer Ahmedabad ( Gujarat )
|
| Author: neeraj sahani 08 Sep 2008 | Member Level: Bronze | Rating: Points: 1 |
i want to copy it on text change of the text box
|