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

DataLoaded event timing changed in 2010 Q1 vs 2009 Q3

3 Answers 56 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Eric Lincoln
Top achievements
Rank 1
Eric Lincoln asked on 24 Mar 2010, 09:48 PM

I'm using the 2010 Q1 RadGridView (2010.1.319.1040) w/VS2010 RC, Silverlight4, RiA Services/EF and MS DataPager.
In the previous release (2009.3.1314.1040) the DataLoaded event would fire after the data has loaded in the grid. For example, if RadGridView.SelectAll() were called in the DataLoaded event handler the 2009.3.1314.1040 RadGridView would select all the rows as expected. With the 2010.1.319.1040 RadGridView the SelectAll call in the same handler has no affect. It seems as if there's no difference between the DataLoaded and DataLoading events.

Is there any chance the DataLoaded event can be fired after the data is actually displayed in the grid so that SelectAll can be set for more than one page?

Thanks,
Eric

3 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 30 Mar 2010, 02:21 PM
Hi Eric Lincoln,

I managed to pinpoint the problem. With Q1 we introduced some code that allows RadGridView to keep its SelectedItem sysnchronized with its CurrentItem and by default the synchronization is enabled. When using Ria Services, the grid will receive Reset CollationChanged event after SelectAll is called which causes the grid to synch SelectedItem and CurrentItem and ultimately only the CurrentItem stays selected. To work around the problem with synchronization you can either turn the synchronization off by setting IsSynchronizedWithCurrentItem to false or use the Dispather to select all items:

1.void playersGrid_DataLoaded(object sender, System.EventArgs e)
2.{
3.    this.Dispatcher.BeginInvoke(new System.Action(() => this.playersGrid.SelectAll()));
4.}


Greetings,
Milan
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
Eric Lincoln
Top achievements
Rank 1
answered on 30 Mar 2010, 05:06 PM
Milan,
Thank you for your very informative reply. Do I need to add this bug to the Publiic Issue Tracking System? I want to make sure this work around is removed from our code as soon as the bug is fixed so it doesn't acquire a life of its own.

Thanks,
Eric
0
Accepted
Milan
Telerik team
answered on 31 Mar 2010, 10:23 AM
Hi Eric Lincoln,

Unfortunately it is the DomainDatasource that is raising a CollectionChanged event with Reset. In such situations are required to reset the CurrentItem and there is not much that we can do to fix the problem. 

Even if we do create a PITS item it is unclear if this issue will be resolved. 
I would like to thank you for your feedback, I have updated your Telerik points.

Sincerely yours,
Milan
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
GridView
Asked by
Eric Lincoln
Top achievements
Rank 1
Answers by
Milan
Telerik team
Eric Lincoln
Top achievements
Rank 1
Share this question
or