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

RadGridView row display

5 Answers 78 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ciaran O'Neill
Top achievements
Rank 1
Ciaran O'Neill asked on 11 Jun 2010, 03:40 AM
Hi,

I'm using a RadGridView (assembley version 2010.1.422.1030) in a SIlverlight 4 app.

My app uses a tab control and the RadGridView is on one of these tabs.  I'm using a DispatchTimer to auto-refresh my RadGrid ever 90 seconds.

I'm having an issue that when I'm on another tab for several minutes and then go back to my tab with the grid, the first row in the grid appears below the rest of the data, with a blank space above it, and the space where the first row should appear is just blank.

This appears to be happening when the auto-refresh happens when I'm on another tab.  If I sit on the tab with the grid while the auto-refresh happens then the grid rows display as expected.

I have not been able to reproduce this in another project, but I'm sure it's nothing to do with our auto-refresh code or the databinding as the exact same methods are called when the view loads as when the refresh occurs.

Attached are screenshots of the grid when an auto-refresh happens "out of sight" and what it normally looks like.

Is this a known issue or anything?

Regards
Ciaran O'Neill

5 Answers, 1 is accepted

Sort by
0
Yavor Georgiev
Telerik team
answered on 11 Jun 2010, 08:38 AM
Hello Ciaran O'Neill,

 Do you refresh by calling Rebind() on the GridView every ninety seconds? A far better approach would be to have your objects implement INotifyPropertyChanged and store them in an ObservableCollection. That way when you change your data, the GridView refreshes only the parts it needs to automatically, with none of the performance hit incurred by calling Rebind() from a timer so frequently.

Kind regards,
Yavor Georgiev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Ciaran O'Neill
Top achievements
Rank 1
answered on 15 Jun 2010, 12:04 AM
Hi,

I am already using the MVVM pattern any my view models implement INotifyPropertyChanged.  I never call rebind on the grid.  All databinding is done via xaml binding syntax and observable collections.  When my timer expires, I just refresh my ObservableCollection.

Has there been any other reports of this mis-rendering of the RadGridView?  Any ideas what would be causing it?

Thanks & regards,
Ciaran O'Neill
0
Yavor Georgiev
Telerik team
answered on 15 Jun 2010, 08:57 AM
Hi Ciaran O'Neill,

 This is a very peculiar scenario. Let me get this straight: you refresh your ObservableCollection so that items added, removed or changed will show up in the GridView, right? The thing is, if you're already using ObservableCollections and INotifyPropertyChanged, the GridView should pick up any changes in your models and refresh itself automatically.

Could you please try to comment out the timer functionality and let me know if the GridView updates itself when the model changes?

Regards,
Yavor Georgiev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Ciaran O'Neill
Top achievements
Rank 1
answered on 15 Jun 2010, 11:36 AM
Hi,

I need the timer because I'm working in SIlverlight in a disconnected scenario and every 90 seconds I poll the database via a service and update the ObservableCollection which is the ItemsSource of the RadGrid.

The issue I'm having is not that the RadGrid is not refreshing.  The RadGrid is refreshing, but when I'm on another tab and the refresh happens the rendering of the grid is affected.  Please refer to my screenshots attached to my inital post to see what I am referring to

Thanks,
Ciaran O'Neill
0
Yavor Georgiev
Telerik team
answered on 15 Jun 2010, 01:31 PM
Hello Ciaran O'Neill,

 I have tried to reproduce the problem in a sample project as best as I could, but so far I have been unable to do so. Please see if you can modify it yourself so as to introduce the faulty behavior. I'm afraid that it won't be possible to debug the problem otherwise.

On a side note, have you applied any custom styling to your GridView? You can also try it with our stock default theme, Office_Black. Perhaps it's a theming issue.

Sincerely yours,
Yavor Georgiev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Ciaran O'Neill
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
Ciaran O'Neill
Top achievements
Rank 1
Share this question
or