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

Unable to clear filter, but set one, when gridview is read only

2 Answers 66 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Morten Nilsen
Top achievements
Rank 1
Morten Nilsen asked on 03 Jan 2012, 08:28 PM
Hello,
I have a grid defined like this:

<telerik:RadGridView
    x:Name="resultsList"
    Grid.Row="1" Margin="4"
    ItemsSource="{Binding Results}"
    telerik:Theming.Theme="Windows7"
    ShowGroupPanel="False"
    AutoGenerateColumns="False"
    MouseDoubleClick="resultsList_MouseDoubleClick"
    ScrollMode="RealTime" CanUserInsertRows="False" CanUserDeleteRows="False" EditTriggers="None" IsReadOnly="True">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn Header="One" DataMemberBinding="{Binding Model.Article}" Width="100" />
        <telerik:GridViewDataColumn Header="Two" DataMemberBinding="{Binding Model.Batch}" Width="50" />
        <telerik:GridViewDataColumn Header="Three" DataMemberBinding="{Binding Model.Serial}" Width="120" ShowDistinctFilters="False" />
        <telerik:GridViewDataColumn Header="Four" DataMemberBinding="{Binding UnitDetails.LastOperation.Name}" Width="120" />
        <telerik:GridViewDataColumn Header="Five" DataMemberBinding="{Binding UnitDetails.Opened}" Width="150" ShowDistinctFilters="False" />
        <telerik:GridViewDataColumn Header="Six" DataMemberBinding="{Binding UnitDetails.Completed}" Width="150"  ShowDistinctFilters="False" />
        <telerik:GridViewDataColumn Header="Seven" DataMemberBinding="{Binding UnitDetails.CurrentStatus}" Width="100" />
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

Running the application, I set a filter to some date on the column here named "Six".
When I then clicked the filter button again, I was unable to clear the filter.
I suspect it has to do with me setting IsReadonly to true.
Is this a bug?

  -- Regards, Morten

2 Answers, 1 is accepted

Sort by
0
Vera
Telerik team
answered on 05 Jan 2012, 02:31 PM
Hi Morten,

 I tried to reproduce the reported issue, but without any success. May I ask you to take a look at the attached project based on the code snippet you provided? Are you able to get the described behavior on it?

Kind regards,
Vera
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Morten Nilsen
Top achievements
Rank 1
answered on 05 Jan 2012, 03:55 PM
The sample does indeed seem to work as it should.
When I open the filter list in my window, the filter/clear filter buttons are both disabled from the start, but in your sample, they are both enabled.

My WPF theme contains this style:

<Style TargetType="{x:Type Button}" BasedOn="{x:Null}">
    <Setter Property="FocusVisualStyle" Value="{DynamicResource NuclearButtonFocusVisual}"/>
    <Setter Property="Background" Value="{DynamicResource NormalBrush}"/>
    <Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
    <Setter Property="Template" Value="{DynamicResource NuclearButton}" />
    <Style.Triggers>
        <Trigger Property="Command" Value="{x:Null}">
            <Setter Property="UIElement.IsEnabled" Value="False" />
        </Trigger>
    </Style.Triggers>
</Style>

I guess that is likely the culprit?

  // Regards, Morten

Tags
GridView
Asked by
Morten Nilsen
Top achievements
Rank 1
Answers by
Vera
Telerik team
Morten Nilsen
Top achievements
Rank 1
Share this question
or