I have a collection to display by using XamDataGrid. The collection has at most two hierarchies. But I don't want to always show the expansion indicator for those records which hasn't any children.
Each item of my collection has a bool property to indicate whether it has children. So, I want to bind this property to the Visibility attribute of a Field. Like bellow.
<Custom:Field Name="StructMembers" Label="Element" Visibility="{Binding Path=IsStruct, Converter={StaticResource theBoolToVisConverter}}" > <Custom:Field.Settings > <Custom:FieldSettings AllowEdit="False" /> </Custom:Field.Settings> </Custom:Field>
But it doesn't work. Maybe the binding source isn't correct, I think. Anyone can help me ?
Hello Sheng,
Thank you for your post. I have been looking into it and I can use the XamDataGrid’s FieldLayoutSettings’ ExpansionIndicatorDisplayMode Property. You can set it to “CheckOnDisplay” and this way the expansion indicator will be visible only for the Records that has child records. Please let me know if you have further questions on this matter.
Looking forward for your reply.
It works. Thank you very much!
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.