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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ColumnGrouping is lost when reloading ItemsSource

Thread ID:

Created:

Updated:

Platform:

Replies:

127632 Nov 29,2016 12:29 PM UTC Dec 5,2016 01:19 AM UTC WPF 3
loading
Tags: SfDataGrid
Harald Betzler
Asked On November 29, 2016 12:29 PM UTC

Hi,

I've a SfDataGrid with ColumnGrouping. When ItemsSource (ObservableCollection) will be updated, then ColumnGrouping disappears.

Please find attached demonstration sample.

Regards

Harald

Attachment: SfGridSample8_7e235e79.zip

Jai Ganesh S [Syncfusion]
Replied On November 30, 2016 12:58 PM UTC

Hi Harald , 
You can achieve your requirement for maintaining the Grouping while changing the ItemsSource by setting the AutoGenerateColumnsMode like below, 
 
<syncfusion:SfDataGrid 
                x:Name="SampleDataGrid"  
                AutoGenerateColumnsMode="RetainOld" 
                ItemsSource="{Binding GridDataSource}" 
                AutoExpandGroups="True" 
                AutoGenerateColumns="True"/> 
  
Regards, 
Jai Ganesh S 


Harald Betzler
Replied On December 2, 2016 09:32 AM UTC

Hi Jai,

this works fine. Thanks for your help.

Regards
Harald

Jai Ganesh S [Syncfusion]
Replied On December 5, 2016 01:19 AM UTC

Hi Harald, 
 
Thank you for the update. 
 
Please let us know if you need further assistance in this. 
 
Regards, 
Jai Ganesh S 


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.

Warning Icon 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.Close Icon

;