views:

3438

answers:

3

Hi All,

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

A: 

maybe a signal like stateChanged() will catch it?

felix
Can you please explain through codes ?
no I can't, I don't know what toolkit/lib/fw you're using. It was just a naiv thought:OnCheckedChanged="chkJobID_CheckedChanged"this is called when it is checked. not when unchecked. so maybe there is listener which is called on general changes. As in Qt, qcheckbox::onStateChanged(). Sorry for my stupid comment.
felix
+1  A: 

Hi Khushi--

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

Jeremy Kratz
A: 

the event did not trigger because you must be creating your control from codebehind. Is that true ? DO you have AutoEventWireUp as true or false in Page property ?

Ved