GridView filter deletes filter of bound Carousel

3 posts, 0 answers
  1. Mike
    Mike avatar
    39 posts
    Member since:
    May 2011

    Posted 01 Jun 2011 Link to this post

    Hi,

    i have UserControl that contains a RadGridView and a RadCarousel. The ItemSource of the RadCarousel is bound to the SelectedItem of the Grid and has a filter. So far so good.

    The Problem is: when the user filters the grid, the filter of the RadCarousel is beeing removed. How can i keep the filter? Is there something wrong with my databinding?

    here is the source of the xaml:

    <telerik:RadGridView x:Name="uxCustomerGrid" ItemsSource="{Binding Customers}" Grid.Row="0" DataLoadMode="Asynchronous" IsReadOnly="True" EnableColumnVirtualization="True" EnableRowVirtualization="true" SelectionMode="Extended" RowIndicatorVisibility="Collapsed" IsSynchronizedWithCurrentItem="True" />
            <telerik:RadCarousel Name="uxEmployeeCarousel" Grid.Row="1" DataContext="{Binding ElementName=uxCustomerGrid, Path=SelectedItem}" ItemsSource="{Binding Bedienstete}" ItemTemplate="{DynamicResource EmployeeTemplate}" IsSynchronizedWithCurrentItem="True">
                <telerik:RadCarousel.FilterDescriptors>
                    <telerik:FilterDescriptor Operator="IsEqualTo" Member="BEDDeaktiviert" Value="0">
                    </telerik:FilterDescriptor>
                </telerik:RadCarousel.FilterDescriptors>
            </telerik:RadCarousel>
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 03 Jun 2011 Link to this post

    Hi Michael,

    You may keep the filter by setting the IsSynchronizedWithCurrentItem property of the GridView to False.

    If this property is set to True, then when you apply a filter on the GridView the current selection is reset and so the DataContext of the RadCarousel as well. This leads to losing of the filter.

    Does this change solves your problem?

    Best wishes,
    Didie
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Mike
    Mike avatar
    39 posts
    Member since:
    May 2011

    Posted 06 Jun 2011 Link to this post

    Hello

    Unfortunately, this has not solved my problem. The filter will still disappear. It is still not clear to me why the carousel loses its filter, if the user filters manually in the grid.

    greetings!
Back to Top