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.
Syncfusion Feedback

GridDataControl and SFDataGrid fail together

Thread ID:

Created:

Updated:

Platform:

Replies:

117427 Oct 19,2014 11:22 PM UTC Oct 20,2014 01:51 PM UTC WPF 1
loading
Tags: GridDataControl
Jeremy Branham
Asked On October 19, 2014 11:22 PM UTC

When I add a reference to Syncfusion.SFGrid.WPF.dll in an existing project that has a GridDataControl, I get this error -

{"Cannot add instance of type 'GridDataGroupColumn' to a collection of type 'FreezableCollection`1'. Only items of type 'T' are allowed."}


If I remove the grouped columns, it will run but my SFDataGrid does not render.
I have to remove the reference to the Syncfusion.SFGrid.WPF assembly for the GridDataControl to work correctly.

Can these controls be used in the same project?

Thanks!

Farjana Parveen Ayubb [Syncfusion]
Replied On October 20, 2014 01:51 PM UTC

Hi Jeremy,

 

Thank you for contacting Syncfusion support.

We have analyzed your query. We are able to use GridDataControl and SfDataGrid in same application. We are having GridGroupColumn in Syncfusion.UI.Xaml.Grid (present in Syncfusion.SfGrid.Wpf.dll) and also Syncfusion.Windows.Control.Grid (Present in Syncfusion.Grid.Wpf.dll) namespaces. And both namespaces are added to the below schema “http://schemas.syncfusion.com/wpf”. The provided application refer to both Syncfusion.Grid.Wpf.dll and also Syncfusion.SfGrid.Wpf.dll. So that only its shows errors ” {"Cannot add instance of type 'GridDataGroupColumn' to a collection of type 'FreezableCollection`1'. Only items of type 'T' are allowed."}”. So, you can define schema like in the below code instead of using default schema definition of syncfusion to overcome this problem,


Please refer the below code snippet and sample in the following location:

 

Code Snippet:

xmlns:sync="clr-namespace:Syncfusion.UI.Xaml.Grid;assembly=Syncfusion.SfGrid.WPF"

xmlns:sncg="clr-namespace:Syncfusion.Windows.Controls.Grid;assembly=Syncfusion.Grid.WPF"

 

 

 

Regards,

Farjana Parveen A


Attachment: GDCSf_Sample_7000699f.zip

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

;