Hi,
I'm trying to bind to an observable collection that has a list as one of its properties. I want the list it to display as a group by when you click the + sign. The PrimeBrokerAccountItems is the list. Any help would be appreciated. Thanks.
<Custom:XamDataGrid Name="SampleGrid" DataSource="{Binding MasterAccounts, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Margin="216,149,0,0" VerticalAlignment="Top"> <Custom:XamDataGrid.FieldLayoutSettings> <Custom:FieldLayoutSettings AutoGenerateFields="False"/> </Custom:XamDataGrid.FieldLayoutSettings> <Custom:XamDataGrid.FieldLayouts> <Custom:FieldLayout IsDefault="true"> <Custom:FieldLayout.Fields> <Custom:Field Width= "150" Name="MasterAccountId" Label="Master Account" Row="1" Column="0"/> <Custom:Field Width= "150" Name="CombinedMargin" Label="Combined Margin" Row="1" Column="1"/> <Custom:Field Width= "150" Name="AscMargin" Label="Asc Margin" Row="1" Column="2"/> <Custom:Field Width= "150" Name="PrimeBrokerAccountItems" Label="Account Id" Row="1" Column="3"/> </Custom:FieldLayout.Fields> </Custom:FieldLayout> </Custom:XamDataGrid.FieldLayouts> </Custom:XamDataGrid>
Hello Jeff,
Thank you for your post.
I have been looking into your issue and the code that you have provided and I can suggest you create one more FieldLayout for the type of the items in your collection property. To display a list as GroupBy I can you add a FieldSortDescription in the SortedFields of the child FieldLayout, for the Field that you wish to be grouped.I created a sample application based on your scenario to show you how you can implement the functionality that you want to achieve.
Please let me know if you need any further assistance on this matter.
I am just checking your progress on the issue that you are having.
If you require any further assistance please do not hesitate to ask.
Thanks. I'm all set. Appreciate your assistance.
Jeff
Hello,
I am just checking if there is anything else I can do for you.