Add Property to a gridview to use with Javascript.
protected void gridview1_RowDataBound(object sender, GridViewRowEventArgs e)
{
#region Add-Parameter-onJavaScript-Functions
if (e.Row.RowType == DataControlRowType.DataRow)
{
CheckBox chk = new CheckBox();
chk = e.Row.FindControl("chkIsEdit") as CheckBox;
chk.Attributes.Add("onChange", "EnableFields(" + e.Row.RowIndex.ToString() + ")");
}
#endregion
}
------------------------------------------------------
Javascript Code
------------------------------------------------------
No comments:
Post a Comment