C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




copying one template coloumn value to other in datagrid


Posted Date: 06 Sep 2008      Total Responses: 2

Posted By: neeraj sahani       Member Level: Bronze     Points: 1



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>





Responses

Author: vipul    08 Sep 2008Member Level: DiamondRating:     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 2008Member Level: BronzeRating:     Points: 1

i want to copy it on text change of the text box


Post Reply
You must Sign In to post a response.
Next : validate Decimal numbers
Previous : to make sliding menu in JavaScript
Return to Discussion Forum
Post New Message
Category: JavaScript

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use