Hi everyone,
we ran into a problem. I did not want to open a support ticket as we could not reproduce it yet. So I was just wandering if anyone encountered this problem before, and knows what's causing it, and how to work around it.
So it looks like sometimes when we update the DataSource of a RadGridView, the property and the underlying object changes, but these changes are not reflected in the actual data the grid is displaying. For example we have to DataTables, t1 and t2. The grid's datasource is t1, and it displays the data fine. Then we bind the grid to t2. Now the DataSource of the grid is indeed t2 if we take a look at it in debug mode. But the grid is still displaying the data taken from t1.
The code switching the data source is in a custom event's handler and the event itself is declared on an interface. If we insert the same code some other place (the click event handler of a button, for example), it works fine. If we insert the code both places, the button won't work either. My guess is that the custom event's handler changes the datasource, but the grid somehow does not notice the change. When the button's event fires, the datasource is already the new one. And as the datasource does not change this time, the grid won't try to update itself.
The form this occurs on is extremely complicated with lots of logic and controls being generated and dumped and reused runtime. I am trying to reproduce the problem, not much success so far. But if someone already encountered it, it would be a great help for us if (s)he shared the experiences.
Thanks,
we ran into a problem. I did not want to open a support ticket as we could not reproduce it yet. So I was just wandering if anyone encountered this problem before, and knows what's causing it, and how to work around it.
So it looks like sometimes when we update the DataSource of a RadGridView, the property and the underlying object changes, but these changes are not reflected in the actual data the grid is displaying. For example we have to DataTables, t1 and t2. The grid's datasource is t1, and it displays the data fine. Then we bind the grid to t2. Now the DataSource of the grid is indeed t2 if we take a look at it in debug mode. But the grid is still displaying the data taken from t1.
The code switching the data source is in a custom event's handler and the event itself is declared on an interface. If we insert the same code some other place (the click event handler of a button, for example), it works fine. If we insert the code both places, the button won't work either. My guess is that the custom event's handler changes the datasource, but the grid somehow does not notice the change. When the button's event fires, the datasource is already the new one. And as the datasource does not change this time, the grid won't try to update itself.
The form this occurs on is extremely complicated with lots of logic and controls being generated and dumped and reused runtime. I am trying to reproduce the problem, not much success so far. But if someone already encountered it, it would be a great help for us if (s)he shared the experiences.
Thanks,