I have template column:
Now I want to change the text in textbox in each row - the text is number, so I want to multiply it by 3.
But I don't know how to get the value of TextBoxes in JavaScript code?
It gives me a "NaN" error, because the innerHTML returns me "<span ...> 3.423 </span>" but not "3.423" for example.
Anyone can help me? The grid is not in edit mode. I have template column with textbox.
| <telerik:GridTemplateColumn HeaderText="salary"><ItemTemplate> |
| <asp:TextBox ID="salary" runat="server"></asp:TextBox></ItemTemplate> |
| </telerik:GridTemplateColumn> |
Now I want to change the text in textbox in each row - the text is number, so I want to multiply it by 3.
But I don't know how to get the value of TextBoxes in JavaScript code?
| var masterTable = $find("<%=RadGrid1.ClientID%>").get_masterTableView(); |
| |
| for(var row = 0; row < masterTable.get_dataItems().length; row++) |
| { |
| var salary = masterTable.getCellByColumnUniqueName(masterTable.get_dataItems()[row], "profit").innerHTML; salary.innerHTML = salary.innerHTML * 2; |
| } |
It gives me a "NaN" error, because the innerHTML returns me "<span ...> 3.423 </span>" but not "3.423" for example.
Anyone can help me? The grid is not in edit mode. I have template column with textbox.