Personalize a custom summary using a custom control

Hi,

I know how to create a custom summary for the gridgroupingcontrol, but as a normal text.

I want to use a custom control in the summary cell of a column. Is it possible?

I need also to call some method of the custom control to update his appearance/values based on the summary value.

Thanks

4 Replies 1 reply marked as answer

AR Arulpriya Ramalingam Syncfusion Team July 30, 2020 02:07 AM UTC

Hi maurizio, 
 
Thank you for your interest in Syncfusion products. 
 
The GridGroupingControl does not have any built-in function to load controls in Summry cells. However, this can be achieved by creating your own cell renderer and Summary. We already provided the details to achieve these scenarios individually and please make use of the below guidelines to implement the behavior from your end. 
 
 
please get back to us, if you need any further assistance. 
 
Regards, 
Arulpriya 



MZ maurizio ziraldo July 31, 2020 09:04 AM UTC

Hi Arulpriya,

more than a GridStaticCellRenderer, probably I need to use a GridGenericControlCellRenderer.

I've already worked with both Custom Summaries and Custom Cell Type.

I'm trying to put a Custom Cell Type in a Summary Cell.

See the attachment demo.

Thanks.




Attachment: bindinglistdemo_391e8b54.zip


AR Arulpriya Ramalingam Syncfusion Team August 4, 2020 02:37 AM UTC

Hi Maurizio, 
 
Thank you for the update. 
 
We could understand the scenario and forwarded the query to our development team for further analysis. We need some more time to analyze completely to provide a solution and we will update you the solution details on 05th August 2020. We appreciate your patience till then. 
 
Regards, 
Arulpriya 



AR Arulpriya Ramalingam Syncfusion Team August 6, 2020 03:47 AM UTC

Hi Maurizio, 
 
Thank you for your patience. 
 
We have modified the sample by setting the summary value to the control and updating the column type using QueryCellStyleInfo event. Please make use of the below code and modified sample for further validation. 
 
Example code 
 
//To add cell model in the grid. 
this.gridGroupingControl1.TableModel.CellModels.Add("CustomSummary", new MyControlCellModel(this.gridGroupingControl1.TableModel)); 
//Event subscription 
this.gridGroupingControl1.QueryCellStyleInfo += GridGroupingControl1_QueryCellStyleInfo; 
 
//Event customization 
private void GridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e) 
{ 
    if(e.TableCellIdentity != null && e.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionSummaryCell) 
    { 
        if (e.TableCellIdentity.ColIndex == 5) 
            e.Style.CellType = "CustomSummary"; 
    } 
} 
 
 
Please get back to us, if you need any further assistance. 
 
Regards, 
Arulpriya 


Marked as answer
Loader.
Up arrow icon