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

Sorting does not work after DataLoadMode is set to Asynchronous

1 Answer 64 Views
GridView
This is a migrated thread and some comments may be shown as answers.
HCT-CERT
Top achievements
Rank 1
HCT-CERT asked on 21 Oct 2012, 07:28 AM
Hi,

I am binding my GridView to QueryableDataServiceCollectionView<T> to load data from a WCF Data Service.I wanted to disaplay the grid built-in busy indicator when paging/sorting the grid, so I set DataLoadMode to Asynchronous.Paging works fine and the busy indicator is shown when data is being fetched but sorting stopped working.Clicking on the column header does not trigger anything.

MyEntities db = new  MyEntities(Global.DataServiceUri);
            var query = db.Sims;
            QueryableDataServiceCollectionView<Sim> dataContext = new QueryableDataServiceCollectionView<Sim>(db, query);
            dataContext.PageSize = 20;
            dataContext.AutoLoad = true;
            DataContext = dataContext;

<telerik:RadGridView DataLoadMode="Asynchronous" Name="SimsGridView" ItemsSource="{Binding}"    CanUserFreezeColumns="False" 
                            AutoGenerateColumns="False"  MouseDoubleClick="SimsGridView_MouseDoubleClick">

Environment:
VS 2012
RadControls 2012 Q3
.NET 4.5
WCF 5.0


Thanks

Madani

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 22 Oct 2012, 06:12 AM
Hello Madani,

I would suggest you to remove the DataLoadMode="Asyncronous" property setting. Using this mode is generally not recommended. 

Please use the default mode and let me know about the result.

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
HCT-CERT
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or