We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

custom grouping case

Hi, it's for a health application  .


Let's say that i have these classes or entities
 public partial class CONSULTATION
{
        public int ID_CONSULTATION { get; set; }
        public int ID_PATIENT { get; set; }
        public System.DateTime DT { get; set; }
        public List<EXAMEN> EXAMENS { get; set; }
}

 public partial class EXAMEN
{  
        public int ID_EXAMEN{ get; set; }
        public string EX_TITLE { get; set; }
 }
 so each Cconsultaion may have 0..n Examens

and i have  a datagrid bound to List<Consultation> .

what i want to get is , a grouping based on EXAMEN,

any help is welcome





3 Replies

SM Saravanan M Syncfusion Team March 20, 2015 12:10 PM UTC


Hi Issam,

Thank you for contacting Syncfusion support,

We have analyzed your query and you can achieve your requirement by CustomGroup in SfDataGrid. In attached sample we have done custom group based on EXAMENS column and you can download the sample from below location.

Sample Location: CustomGrouping_Sample.zip

Please let us know if you have any other queries,

Regards,

Saravanan.M




IS issam March 20, 2015 02:12 PM UTC

Many thanks, !

one little thing :
is there a way to sort the grid by the groups items count ?




SM Saravanan M Syncfusion Team March 20, 2015 02:35 PM UTC

Hi Issam,

Thanks for your update,

Yes, we are able to Sort the Groups by clicking the Grouped Column Header based on the GroupItems count. Please refer the below documentation link to achieve your requirement.

Documentation: http://help.syncfusion.com/ug/wpf/documents/sortgroupsbasedonsum.htm

Please let us know if you have any other queries,

Regards,

Saravanan.M


Loader.
Live Chat Icon For mobile
Up arrow icon