Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
322
ClearDataSource call causes Multiple controls with the same ID error
posted

It appears there is some kind of issue with calling ClearDataSource on a postback and the presence of the "Multiple controls with the same ID error" being thrown when a Template control exists in the WebDataGrid. 

I have a template column with a checkbox and if I use the ClearDataSource call before rebinding the WebDataGrid on a postback I get the "Multiple controls..." error presumably related to the checkbox.  If I comment out the ClearDataSource my postback works just fine and I don't get the fatal error but then, even though I'm rebinding the WebDataGrid (with a refreshed object List<T> collection pulled from the db) on the postback, the OnInitializeRow event handler does not fire again - it will fire on the intiial page load and that's it - which also is a problem as I set some custom cell tooltips when the InitializeRow event is fired - seem's I'm darned if I do, and darned if I don't.  Anyone have any thoughts.