Click here to Skip to main content
15,887,961 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i'm New to WPF, started creating a WPF application with ExtendedDataGrid/wpfextended, when i try to implement ExtendedDataGrid in the TabControl like below,

<tabControl>
<TabItem Header="TestTab"><ExtendedGridControl:ExtendedDataGrid x:Name="GridView" ItemsSource="{Binding SourceTable}" AutoGenerateColumns="False" HideColumnChooser="True"                        CanUserAddRows="False" OnlyTwoWaySorting="True" SearchAutoFilterVisibility="Visible" AutoFilterFontSize="12" GroupByControlVisibility="Collapsed">
</ExtendedGridControl:ExtendedDataGrid>
</TabItem>
</tabControl>


i'm getting an error as

'FrozenRowCount' property was already registered by 'DataGrid'.


What I have tried:

i have add enable Both EnableColumnVirtualization and EnableRowVirtualization to true.

<tabControl>
<TabItem Header="TestTab"><ExtendedGridControl:ExtendedDataGrid x:Name="GridView" ItemsSource="{Binding SourceTable}" AutoGenerateColumns="False" HideColumnChooser="True"                        CanUserAddRows="False" OnlyTwoWaySorting="True" SearchAutoFilterVisibility="Visible" AutoFilterFontSize="12" GroupByControlVisibility="Collapsed" EnableColumnVirtualization="True" EnableRowVirtualization="True">
</ExtendedGridControl:ExtendedDataGrid>
</TabItem>
</tabControl>


still the error persist.
Posted
Updated 19-Jun-19 12:52pm
Comments
Richard MacCutchan 28-May-19 6:56am    
Please edit your question and show the code where the error message occurs, and indicate the exact line that causes it.
Member 10738387 28-May-19 7:02am    
it shows the error when i start adding the ExtendedGridControl.ExtendedDataGrid itself.

Considering you are "new" to WPF, why are you bothering with "ExtendedGridControl" when WPF has a "native" datagrid control?

For all intents the "extended grid" is a "3rd party" grid that stood in until WPF got a "native" grid (a few years ago).

Use the native WPF data grid control.

The DataGrid control - The complete WPF tutorial[^]
 
Share this answer
 
Comments
Member 10738387 29-May-19 1:37am    
yes, i tried with native grid and its doesnt have multi-Value filters for each columns. i have googled it and ExtendedGrid met all my requirements.
That problem means something has already registered that DependencyProperty name on that class. Normally this happens for one of two reasons:

1. The DependencyProperty field was not declared as static.
2. There was a cut and paste error re-registering the same name for a different DependencyProperty.Register call.

The other thing that I want to point out, is that FrozenRowCount looks like it's being registered on the default WPF DataGrid; however, if you're using that underneath the hood in your extended objects you should be registering the new DependencyProperty on the extended classes not the default WPF DataGrid.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900