>Hi everybody,
>
>I have a very strange problem. I added some code yesterday which worked in my tests
>
>protected void bntSavedApproved_Click(object sender, EventArgs e)
> {
> int PeopleApproved = 0;
> for (int i = 0; i < this.ProfilesGrid.Rows.Count; i++ )
> {
> CheckBox chkbtnApproved = this.ProfilesGrid.Rows[i].FindControl("chkApproved") as CheckBox ;
>
> if (chkbtnApproved != null)
> {
> if (chkbtnApproved.Checked == true)
> {
> int RegID = (int)this.ProfilesGrid.DataKeys[i].Value ;
> Util.RunStoredProc("SaveApprovedPerson", new System.Data.SqlClient.SqlParameter("RegistrationID", RegID));
> PeopleApproved++;
> }
> }
> }
>
>
>Today I continued to work on this page, added one more control, etc. and for some reason it doesn't work anymore. I check the checkbox in the grid, but it doesn't go into chkbtnApproved.Checked = true anymore.
>
>Do you know what could be wrong?
>
>Thanks in advance.
Is it because you are first checking chkbtnApproved != null rather than chkbtnApproved.checked != null ?
____________________________________
Don't Tread on Me
Overthrow the federal government NOW!
____________________________________