what code did you add on checkbox_click event?

Also is this the windows application or web application?

Did you try debugging and checked what's the cause?