This code describe show to call javascript function on rowcreated event
protected void grdIssue_RowCreated(object sender, GridViewRowEventArgs e) { CheckBox chkHead = new CheckBox(); if (e.Row.RowType.ToString().Trim() == "Header") { chkHead = (CheckBox)e.Row.FindControl("chkbxHeader"); chkHead.Attributes.Add("onClick", "chkBocHeader(" + chkHead.ClientID + ",'H')"); } else if (e.Row.RowType.ToString().Trim() == "DataRow") { CheckBox chkRow = new CheckBox(); chkRow = (CheckBox)e.Row.FindControl("chkboxRow"); chkRow.Attributes.Add("onClick", "chkBocHeader(this,'R')"); } }
|
No responses found. Be the first to respond and make money from revenue sharing program.
|