Hi friends, I am using C#,asp.net, .net framework2. I am using the following javascript <script type="text/javascript"> function funcsum(id) { var table = document.getElementById("grdView"); var sum = 0; var mess=0; var mess1=0; mess=table.rows[id].cells[7].getElementsByTagName("input")[0].value; mess1=table.rows[id].cells[8].getElementsByTagName("input")[0].value; sum=parseFloat(mess.replace(",","."))+parseFloat(mess1.replace(",",".")); var grid = document.getElementById("<%= grdView.ClientID %>"); //sum = grid.rows[1].cells[7].childNodes[0].value; grid.rows[id].cells[9].childNodes[0].value = sum; } </script> i am using a hidden field <asp:HiddenField ID="HFRowNo" runat="server" Value='<%# Eval("rowNo") %>' /> I have to pass the value of rowno to javascript function in the textbox of template column. How to do this? <asp:TemplateField HeaderText="P & L As Per Book"> <ItemStyle Width="80px" BackColor="White"/> <ItemTemplate> <asp:TextBox Width="80px" ID="txtPL" runat="server" text='<%# Eval("PL") %>' BorderStyle="None" BorderColor="white" OnChange="funcsum(<%# Eval("rowNo") %>)" AutoPostBack="false" > </asp:TextBox> </ItemTemplate> <FooterTemplate> <asp:Label ID="lblFPL" runat="server" /> </FooterTemplate> <ControlStyle Width="80px" /> </asp:TemplateField>
var hdvalue = document.getElementById('Hidden1').value
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)