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.

ColumnGrouping is lost when reloading ItemsSource

Thread ID:

Created:

Updated:

Platform:

Replies:

127632 Nov 29,2016 07:29 AM Dec 4,2016 08:19 PM WPF 3
loading
Tags: SfDataGrid
Harald Betzler
Asked On November 29, 2016 07:29 AM

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 07:58 AM

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 04:32 AM

Hi Jai,

this works fine. Thanks for your help.

Regards
Harald

Jai Ganesh S [Syncfusion]
Replied On December 4, 2016 08:19 PM

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.

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.

;