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
I have the excact same problem. I've found that setting the Visibility on the DataRecord property on the DataRecordPresenter works. I used the RecordsDeleting event to set the Visibility of the DataRecord.
The problem is that doing it this way, does not automatically show the record again when the entity is "undeleted" without rebinding to the datasource. I would rather solve this by a Style/DataTrigger, as suggested above.
Hello,
We do not recommend using this to hide records. If you need to "hide" them based on some property, you should be using RecordFiltering option in version 9.1 - this would have the same result, or removing them from the datasource.
Please let me know if you have questions on this matter.
Regards,
Alex.
RecordFiltering worked for me. A thing to note is that the property you're filtering on must be included as a Field in the FieldLayout, as far as I can tell. Its Visibility can, of course, be Collapsed.