Sai Sherlekar

Sai Sherlekar

  • 737
  • 1.2k
  • 238.6k

checkbox inside gridview checkchanged event not firing

Sep 25 2012 8:10 AM
 protected void grdManageAgent_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            CheckBox chkSelect = (CheckBox)e.Row.Cells[0].FindControl("chkCheck");             
            if(chkSelect!=null)
            chkSelect.CheckedChanged += new EventHandler(chkSelect_CheckedChanged);
        }
    }

    void chkSelect_CheckedChanged(object sender, EventArgs e)
    {
        SaveCheckedValues();
    }

Answers (2)