OnCheckedChanged event of checkbox within a gridview

checkboxgridviewoncheckedchanged

I have a checkbox control in the gridview with Autopost back = true

Code:

' runat="server" AutoPostBack="True" OnCheckedChanged="chkJobID_CheckedChanged" />

Now, when i check the checkbox the 'OnCheckedChanged' fires and add the jobID to the array, but when i uncheck the checkbox then it doesnt fires…………….

Can anybody help me out for this………………

Khushi

Best Answer

Could you replace the code in your chkJobID_CheckedChanged event handler with this:

Response.Write(DateTime.Now.ToLongTimeString());

Then view the page and try checking and unchecking the checkbox. This will tell us if the event handler is firing for both check and uncheck actions, which should help us narrow down the problem.

--Jeremy