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

row visibility collapsed / it doesn't disappear

1 Answer 333 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Алексей
Top achievements
Rank 1
Алексей asked on 10 May 2018, 07:48 AM

Hi.

I use GridViewDataColumn.CellTemplate. I have a bool SatisfiesSearch property  and I want use DataTrigger to collapsed rows.

<telerik:RadGridView.RowStyle >

                <Style TargetType="telerik:GridViewRow">
                    
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Path=SatisfiesSearch, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Value="False">
                            <Setter Property="Visibility" Value="Collapsed"/>
                            <Setter Property="MinHeight" Value="0"/>
                            <Setter Property="Height" Value="0"/>
                            <Setter Property="MaxHeight"  Value="0"/>
                        </DataTrigger>
                    </Style.Triggers>
              </Style>
</telerik:RadGridView.RowStyle>

It really works, but rows don't disappear, they hide.

 

Can you help me?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 14 May 2018, 12:03 PM
Hello Алексей,

RadGridView is a data-bound component that utilizes virtualization for its items. Thus, manipulating the Visibility of its visual elements is not recommended. You can modify the underlying data source instead. Please, take a look at the UI Virtualization help article for further reference.

Hope this helps.

Regards,
Stefan
Progress Telerik
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.
Tags
GridView
Asked by
Алексей
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or