We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Update ItemSource on Sort

Thread ID:

Created:

Updated:

Platform:

Replies:

110424 Aug 2,2013 06:38 AM Sep 26,2013 05:46 AM WPF 3
loading
Tags: GridControl
JEAN MICHEL CAMIZON
Asked On August 2, 2013 06:38 AM

Hi,

I am using GridDataControl and I'd like to know if it possible to keep the ItemSource sorted like it's displayed.

In my case, when I delete a row from the sorted data I want the CurrentRow to stay at the same position, but actually that's not it. 

Maybe this exemple will help you understand my problem

ItemsSource (a ObservableCollection) :
One
Two
Three
Four

GridDataControl displayed data (sorted alphabetically):
Four
One
Three
Two

If the current item is Three and I delete it, then I want the CurrentItem to stay at the same position (wich should be Two) but instead the CurrentItem will be Four.


Saravanan M [Syncfusion]
Replied On September 3, 2013 08:35 AM

Hi Jean,

We have analysed the reported issue with our sample; but we are not able to reproduce the issue. Can you please revert us by modifying the sample based on your application along with the replication procedure. This would be helpful for us to serve you.

Could you please share the product version details with us?

Please find the attached sample below.

Please let us know if you have any queries.

Regards,

Saravanan.M



GridDataControl_sample_sort_bbbbcd60.zip

JEAN MICHEL CAMIZON
Replied On September 17, 2013 03:31 AM

Hi,

Thank you for yout answer it helped me, but I figured I was missing something else too.
It was because I didn't turn off the sort when editing.

Thank you again.

Gobinath A [Syncfusion]
Replied On September 26, 2013 05:46 AM

Hi Jean,

 

Sorry for the  delay to getting back to you.

 

We have analyzed your query and you can disable the sorting operation while editing by using the SortingOptions API as below code snippet.

Code snippet[XAML]:

<syncfusion:GridDataControl x:Name="dataGrid1"

     ItemsSource="{Binding ProductInfo}"

     SortingOptions="DisableSortingOnEdit">

Please let us know if you have any queries.

Regards,

Gobinath A.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;