I have a checkbox as a control in a datarepeater object. I have an event handler function which handles the checkchanged event for this checkbox and sets the visibility of other fields based on it.
However, the problem I am having is that the event handler function is getting fired when I set the datasource for the datarepeater - hence when the data is being populated. So the event handler function ends up trying to set the visibility of a field that has not been created yet and bombs out with a NullReferenceException error.
Is there a way to stop this event handler being fired when the datarepeater is being populated?
Mighty
However, the problem I am having is that the event handler function is getting fired when I set the datasource for the datarepeater - hence when the data is being populated. So the event handler function ends up trying to set the visibility of a field that has not been created yet and bombs out with a NullReferenceException error.
Is there a way to stop this event handler being fired when the datarepeater is being populated?
Mighty