Code :
First add your own attribute in input fields in order to make them unique and find them with jquery.
Simple demo is described below
function Check_Click(objRef) {
// alert($("input[txt='1']").val() + ",,,," + $("input[txt1='2']").val() + ",,,," + $("input[txt2='2']").val());
if ($(row).find("input[txt='1']").val() == '' || $(row).find("input[txt1='2']").val() == '')
{
}
else
{
$(row).find("input[txt2='2']").val( $(row).find("input[txt='1']").val() * $(row).find("input[txt1='2']").val());
}
}
<asp:TextBox ID="txtentativecost" txt="1" Text='<%# Eval("TentativeCost")%>' runat="server" MaxLength="50"
Width="25px" onkeyup="Check_Click(this)"></asp:TextBox>
Thanks :)
First add your own attribute in input fields in order to make them unique and find them with jquery.
Simple demo is described below
function Check_Click(objRef) {
// alert($("input[txt='1']").val() + ",,,," + $("input[txt1='2']").val() + ",,,," + $("input[txt2='2']").val());
if ($(row).find("input[txt='1']").val() == '' || $(row).find("input[txt1='2']").val() == '')
{
}
else
{
$(row).find("input[txt2='2']").val( $(row).find("input[txt='1']").val() * $(row).find("input[txt1='2']").val());
}
}
<asp:TextBox ID="txtentativecost" txt="1" Text='<%# Eval("TentativeCost")%>' runat="server" MaxLength="50"
Width="25px" onkeyup="Check_Click(this)"></asp:TextBox>
Thanks :)
Comments
Post a Comment