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

Radgridview Filter not working

5 Answers 988 Views
GridView
This is a migrated thread and some comments may be shown as answers.
cha
Top achievements
Rank 1
cha asked on 05 Jan 2017, 07:45 PM

I have a GridViewDataColumn declared as below in XAML. 

                    <telerik:GridViewDataColumn DataMemberBinding="{Binding L3Size, StringFormat='0'}"  UniqueName="L3Size"<br>IsReadOnly="True" <br>SortMemberPath="L3Size" Width="60" CellStyleSelector="{StaticResource L3SizeStyler}" ><br>                        <telerik:GridViewDataColumn.Header><br>                            <TextBlock Text="L3 Sz" TextWrapping="Wrap" Style="{StaticResource TextBlockWhite}" /><br>                        </telerik:GridViewDataColumn.Header><br>                    </telerik:GridViewDataColumn><br>

 

A filter is applied on the grid for L3Size > 0 and it works fine.  L3Size for one of the rows becomes 0 and the value is correctly displayed as 0 on the grid. 

L3Size is set to 0 in the viewmodel. But that row doesnt get filtered out.

Any idea why its happening ?

 

5 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 10 Jan 2017, 01:19 PM
Hi,

In order the filtering to be reapplied in this scenario, a property change notification from the underlying data item needs to be raised. Otherwise, the control cannot be aware that its value has changed. This can be achieved by using the approach demonstrated in the Edit an item outside RadGridView topic.

I hope this helps.

Regards,
Stefan X1
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
shree
Top achievements
Rank 1
Veteran
answered on 05 Aug 2020, 08:32 PM

I have a radgrid with column containing Border and Text in its

<DataTemplate>

The filtering funnel icon is missing from the grid for that column, it should be filterable like rest of the columns.

What should I do to enable filtering for such column?

I am attaching the project from google drive which will resemble my scenario. [ Attachment ]. The grid has a "Status" column which is missing funnel icon. It should filterable by text and when filtered, show text and border. Please have a look.

0
shree
Top achievements
Rank 1
Veteran
answered on 06 Aug 2020, 11:54 AM
Solved by setting "FilterMemberPath" for the column.

<telerik:GridViewColumn FilterMemberPath="STATUS_STRING"
                                              IsFilterable="True"
                                              Header="Status" Width="1*">                             <telerik:GridViewColumn.CellTemplate>
         <DataTemplate>
              <Grid>
                 <Border HorizontalAlignment="Left" VerticalAlignment="Center"
                                                Style="{Binding WARNING_STATUS,
                        Converter={StaticResource navStatusToColorCodeConverter}}">
                 </Border>                                      
                 <TextBlock Margin="20 0 0 0" Text="{Binding STATUS_STRING}"></TextBlock>
            </Grid>
         </DataTemplate>
 </telerik:GridViewColumn.CellTemplate>
</telerik:GridViewColumn>
0
Yefan
Top achievements
Rank 1
Veteran
answered on 17 Aug 2020, 03:42 PM

Hello, I'm using popup default filtering for my gridview and define all my columns dynamically in code.

But when I try to filter for a string or a numeric value, all my rows are removed from the collection.

How could I resolve this issue?

0
Vladimir Stoyanov
Telerik team
answered on 20 Aug 2020, 07:10 AM

Hello Yefan,

I posted a reply in the other forum thread that you have opened: No rows displayed when filtering, grouping or sorting. May I ask you to continue the discussion there in order to avoid duplicating replies? 

Thank you in advance for your understanding.

Regards,
Vladimir Stoyanov
Progress Telerik

Tags
GridView
Asked by
cha
Top achievements
Rank 1
Answers by
Stefan
Telerik team
shree
Top achievements
Rank 1
Veteran
Yefan
Top achievements
Rank 1
Veteran
Vladimir Stoyanov
Telerik team
Share this question
or