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

Keep sorting when filling RadGridView with new rows

1 Answer 110 Views
GridView
This is a migrated thread and some comments may be shown as answers.
haagel
Top achievements
Rank 1
haagel asked on 22 Oct 2010, 01:27 PM

I use a RadGridView to show data. The user is allowed to sort by any column by clicking it, using the built-in sorting feature. This works fine.

 

The problem occurs when the rows in the gridview are replaced. The gridview is always filled with rows after the user has done a search. However, the new rows are not sorted in the specified way.

 

Example:

The user does a search which fills the gridview with rows.

The user clicks the header of column A to sort by that column.

The user does a new search which fills the gridview with new  rows.

The gridview now still indicates that is is sorted by column A, but the rows are NOT sorted in that way

 

Is this a bug or "by design"? Is there any way to solve my problem?

 

If no better solution exist, I was thinking that maybe I can manually tell the gridview to sort the rows according to its current sorting state after I have filled it with new rows. But I cannot find a way to do that neither...

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 25 Oct 2010, 07:20 AM
Hello,

 Can you post more info about your collection and how new items are added? Generally the grid can handle INotifyCollectionChanged and will resort itself. You can check for example this blog post for more info. 

All the best,
Vlad
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
haagel
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or