This is a migrated thread and some comments may be shown as answers.

GridView filter deletes filter of bound Carousel

2 Answers 45 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 2
Mike asked on 01 Jun 2011, 12:30 PM
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 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 03 Jun 2011, 09:21 AM
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
0
Mike
Top achievements
Rank 2
answered on 06 Jun 2011, 08:01 AM
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!
Tags
Carousel
Asked by
Mike
Top achievements
Rank 2
Answers by
Dimitrina
Telerik team
Mike
Top achievements
Rank 2
Share this question
or