Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
255
Binding Record Visibility to Business Logik Property
posted

Hello,

What i want to do is hide Records without having to rebind the Datasource. I have a BindingList as Datasource for the Xamdatagrid. The business objects of the list have a bool IsDeleted property. I want to display the records based on this property.

I have tried to achieve this by Binding the Visibility property of the DataRecordPresenter with an BoolToVisibiltyConverter.

<Style TargetType="{x:Type igDP:DataRecordPresenter}">

                                <Setter Property="Visibility"

                                            Value="{Binding RelativeSource={RelativeSource Self}, Path=DataRecord.DataItem.IsDeleted,

                                        Converter={x:Static core:BoolToVisibilityConverter.Instance}}"/>

</Style>


The converter gets called when i set the Property but the records are still displayed. Can anyone help with this problem? IsDeleted throws a propertychanged event.


Regards