This is a migrated thread and some comments may be shown as answers.

Sticky data source

5 Answers 82 Views
GridView
This is a migrated thread and some comments may be shown as answers.
bmolnar
Top achievements
Rank 1
bmolnar asked on 24 Aug 2008, 10:41 AM
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,

5 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 27 Aug 2008, 09:55 AM
Hello bmolnar,

Thank you for your question.

There are no known issues with refreshing RadGridView when changing the DataSource, independently of where the change is made - in your custom event handler, in a predefined event handler or in another method.

I will be glad to help you if you manage to reproduce the issue - just send me a sample project and I will review it for you.

 
Regards,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Roberto
Top achievements
Rank 1
answered on 05 Sep 2008, 07:58 PM
I have the same problem.
Any times, the value of edited cells are different from values on datasource.

Any suggestion?
0
Nikolay
Telerik team
answered on 09 Sep 2008, 11:40 AM
Hi Roberto,

We are still unable to reproduce the wrong behavior. Therefore, please open a new support ticket and send me a sample project which demonstrates it. This will allow me to address the issue further and to give you more accurate assistance.

 
Greetings,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Kevin Meyer
Top achievements
Rank 1
answered on 10 Sep 2008, 07:57 PM
I have experienced refresh issues with the grid in the past where it would not always refresh itself after data binding.  There is a function on the grid element that might help.  After resetting the datasource, try invoking
yourGrid.GridElement.Update(GridUINotifyAction.Reset); 

The followup posts mention edit mode.  I'm not sure if this relates, but in Q1 '08 there were issues where grid editors were being cached.  This had strange side-effects.  I don't know whether or not these issues have been resolved in latest versions.
0
Nikolay
Telerik team
answered on 16 Sep 2008, 03:27 PM
Indeed, we had an issue with caching the RadComboBoxEditor. However, this issue has been addressed in Q2 2008 SP1.

As to the refresh issue of RadGridView, I will be grateful if you share some additional details of your scenario and the behavior that you experience. If possible, check whether this issue still persists in the latest version. If so, please open a new support ticket and send me a sample project so that I can analyze it further. This will allow me to give you more accurate help.

Roberto and bmolnar, I am still looking forward to receiving your sample projects. Helping me to reproduce the issue is the only possibility to address it.
 

All the best,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
bmolnar
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Roberto
Top achievements
Rank 1
Kevin Meyer
Top achievements
Rank 1
Share this question
or