Home Forums WPF controls Xceed DataGrid for WPF Filtering in Code is not working

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #26811 |

     

    I’m binding the Grid in Code , and i’m creating DataGridCollectionView object by using the Table which i want to bind to Grid.But i’m unable to filter .

    DataGridCollectionView dataGridCollectionView = new DataGridCollectionView((IEnumerable)selectionPanleDataView);

    dataGridCollectionView.AutoFilterMode = AutoFilterMode.And;

    dataGridCollectionView.DistinctValuesConstraint = DistinctValuesConstraint.Filtered;

    gridSelectionPanel.ItemsSource = dataGridCollectionView;

     

    Where as is i Set the property in Xaml , i;m able to filter them. Please help me out in filetring  .

    <xceed:DataGridCollectionViewSource x:Key=”dgcvsEntities

    Source=”{Binding Source={x:Static Application.Current},Path=Entities}”

    AutoFilterMode=”And” DistinctValuesConstraint=”Filtered” >

    </xceed:DataGridCollectionViewSource>

     

    <xceed:DataGridControl Name=”dataGrid” Grid.Row=”0″ Grid.Column=”0″ ItemsSource=”{Binding Source={StaticResource dgcvsEntities}}” HorizontalAlignment=”Stretch” HorizontalContentAlignment=”Stretch” VerticalAlignment=”Stretch” VerticalContentAlignment=”Stretch” MinHeight=”150″ MinWidth=”150″>

    </xceed:DataGridControl>

     

    Imported from legacy forums. Posted by Rachana (had 918 views)

    Xceed Support
    Member
    Post count: 5658

    We tested it using your code in version 2.0 and it works correctly. What version are you using? If you still have the problem, send a repro application at support@xceedsoft.com mentioning this forum post and to Christ’s attention. It will help us investigate your issue.

    Imported from legacy forums. Posted by Chris [Xceed] (had 373 views)

    User (Old forums)
    Member
    Post count: 23064

    Hay !

    Thank you for your reply. I’m using Xceed 2.0 Trial version  of Professional  Edition. ( I didnot gave any key while installing it ) .

    Before that i installed with key at that time i couldn’t get even Filtering oprions in xaml also — as u mentioned Filtering , Fixed columns are supported only in Professional Edition.

    Do this is becoz of the version i’m using ? ( Xceed 2.0 Trial Version of Professional Edition 45 days  ).

     Once again i checked it in my application , Now i’m getting an error like

    {“You are using the AutoFilter feature, which is available only in Professional Edition. To use this feature, you must purchase a Professional Edition license.”}

     

    Thank you !

    Rachana. 

     

     

    Imported from legacy forums. Posted by Rachana (had 539 views)

    User (Old forums)
    Member
    Post count: 23064

    Hay !

    Sorry !  The statement i’ve written while testing my application ,as i set a key in App.xaml . after removing the key from App.xaml i’ve tried again but there is no option for AutoFilter just the grid gets binded and i’m able to see the data.

    Where as same thing,  ive done in a prototype i’m able to auto filter irrespective of binding the grid in Xaml or code.

    why there is the problem with my Application and not the prototype , i’m unable to understand. Please help me out.

    Thank You !

    Rachana 

     

    Imported from legacy forums. Posted by Rachana (had 655 views)

    Xceed Support
    Member
    Post count: 5658

    Could you provide more informations about what is done in the prototype vs your application please?  Code snippets or repro app at support@xceedsoft.com would help us investigate further.

    Imported from legacy forums. Posted by Chris [Xceed] (had 1179 views)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.