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

sorting Summary column for GridGroupControl


Hi,

How can I sort SummaryColumn in GGC ?
When I click the column header, seems it only sort the underlying, didn't sort by the value of SummaryColumn.

meanwhile, please indicate how to alighment the SummaryValue (to left, to right ... etc).

Please advice.


David

3 Replies

LS Lingaraj S Syncfusion Team July 18, 2009 06:36 AM UTC

Hi,

Thank you for your interest in Syncfusion product.

If you want to sort the Summary value SetGroupSummarySortOrder method and GroupSortOrderComparer property. The SetGroupSummarySortOrder method is used to set the summary order in the GridGroupingControl. The GroupSortOrderComparer property used to add the custom comparer to sort the summary.

Refer the sample shipped along with our product dashboard shipped along with the below location:
Grid Grouping Samples -> Calculate Summary -> Sort by Summary Demo

If you want to set the set the Alignment in summary cell, then please try using GridSummaryRowDescriptor in GridGroupingControl to achieve this behavior. The Appearance.AnySummaryCell.HorizontalAlignment property used to set the all summary cells.

Refer the code below:

GridSummaryRowDescriptor summaryRow2 = new GridSummaryRowDescriptor();
// For caption summary summaryRow2.Appearance.GroupCaptionSummaryCell.HorizontalAlignment = GridHorizontalAlignment.Right;
// For all summary cells
summaryRow2.Appearance.AnySummaryCell.HorizontalAlignment = GridHorizontalAlignment.Right;


Please let me know if it helps .

Regards,
Lingaraj S.


DC David Cui July 22, 2009 10:00 PM UTC


Thanks a lot !

Another question:

How do I do the cell alighment for the most inner grid (in GGC) values ? seems not working for me.

best,

David


LS Lingaraj S Syncfusion Team July 24, 2009 01:40 PM UTC

Hi David,

Thank you for the update.

If you want to set the Right alignment fro all RecordField cell, then please try using AnyRecordFieldCell property in TableDescriptor.Apperance to achive this behaviour. The TableDescriptor is maintained the Appearance style of the GridGroupingControl.

Refer the code below:
this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.HorizontalAlignment = GridHorizontalAlignment.Right;

Please let me know if you have any queries.

Regards,
Lingaraj S.

Loader.
Live Chat Icon For mobile
Up arrow icon