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
275
xamDatGrid grouping
posted

Hi,

I'm trying to use grouping feature of xamdatagrid. I would like to do initial default grouping by three fields and then allow user to rearrange or group accordingly as he wishes. Is that something that is possible? I'm using ListCollectionView and SortEvaluationMode = 'UseColllectionView'

Thanks

Parents
  • 34830
    Offline posted

    Hello RJ,

    In order to initially group the XamDataGrid when using a collection view, I would recommend that you add a new PropertyGroupDescription to the GroupDescriptions collection of your ListCollectionView. Note, in order for this to work correctly, you will also need to set the GroupEvaluationMode property of your XamDataGrid.FieldLayoutSettings to "UseCollectionView." This essentially delegates the grouping work back to the collection view that is used as the DataSource of your XamDataGrid.

    As an alternative, you can go without setting the UseCollectionView setting in this case, and add new FieldSortDescription elements to your XamDataGrid FieldLayout's SortedFields collection. You can read further about doing this here: https://ko.infragistics.com/help/wpf/xamdatapresenter-sorting-and-grouping-fields-programmatically.

    I have attached a sample project to demonstrate the initial ListCollectionView grouping operation. I hope this helps.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer

    XDGPreGroupCollectionViewCase.zip
Reply Children