//////////////////////// HTML
/////////////////////////js
<asp:GridView runat="server" ID="grdclaimdetails">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox runat="server" ID="Personal" onclick="return getRowIndexVal(this);" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
/////////////////////////js
<script>
function getRowIndexVal(Personal) {
var rc = $('[id$=hdnrc]').val();
var op1 = $(Personal).attr("id");
var row = Personal.parentNode.parentNode.parentNode;
var i = row.rowIndex; // - 1;
$('[id$=grdclaimdetails] tr').eq(i +
1).find("td").eq(7).find("input:text[id$=txtcperdiemamt]").val(pval);//value of textbox at cell 7
}
</script>
No comments:
Post a Comment