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
125
How to bind a property to an attribute of a Field ? Such as Visibility
posted

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 ?

Parents
No Data
Reply
  • 138253
    Offline posted

    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.

Children