Hello Team,
I would like to write the grouping logic that should be executed whenever a user drags a column in the Xamdatagrid for grouping. How can I achieve that?
Please help. Thank you.
Hello Sherif,
I am just checking if you require any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thank you for your reply. I have been looking into your question and I am not completely sure what is the functionality that you are trying to achieve. The custom group by functionality that I have implemented for you, in the sample application, that I have attached, is meant to control the grouping logic for the GroupBy functionality of the XamGrid. You can use that functionality to provide you own logic of grouping, when you drag header onto the group by area. Would you please clarify, how would you like to change the data source of the XamGrid, when you are grouping it and what should be change on the data source?
Looking forward to hearing from you.
Hello Krasimir,
Thank you for your reply. I was wondering if I could do things like change the datasource of the grid in the custom logic of grouping? Is that possible?
Thank you for your email. I have been looking into your question and both XamDataGrid and XamGrid support custom groping. For the XamDataGrid you can use the GroupByEvaluator property of the FieldSettings of the Field. You can read more detailed information regarding this here in our documentation: http://help.infragistics.com/NetAdvantage/WPF/current/CLR4.0/?page=InfragisticsWPF4.DataPresenter.v12.2~Infragistics.Windows.DataPresenter.FieldSettings~GroupByEvaluator.html.
The XamGrid also supports custom grouping. To do that you can use the GroupByComparer property of the columns. This property accepts an IEqualityComparer<T> type. You can find more information regarding the GroupByComparer here: http://help.infragistics.com/Help/NetAdvantage/Silverlight/2011.1/CLR4.0/html/SL_xamGrid_Custom_GroupBy.html. Also I have created a sample application for you, that shows how you can implement custom grouping in XamGrid.
Please let me know if you need any further assistance on the matter.