SffDataGrid Summary size and Export to pdf

good morning, sorry I have 2 questions,
1) is there any way I can make the column width fit the summary?



2) when exporting to pdf the format of the groups are lost.



This is report



10 Replies 1 reply marked as answer

SS Sivaraman Sivagurunathan Syncfusion Team October 20, 2020 10:46 AM UTC

Hi David, 
  
Thanks for using Syncfusion Controls. 
  
Regarding the Summary width: 
  
We have checked your query. In that, if your set the ColumnSizer as None it will consider the summary width. Please refer the following code snippet. 
  
  
<sfgrid:SfDataGrid x:Name="dataGrid1" 
            ColumnSizer="None" 
            ItemsSource="{Binding OrdersInfo}" 
            AutoGenerateColumns="True"> 
  
    <sfgrid:SfDataGrid.GroupColumnDescriptions> 
        <sfgrid:GroupColumnDescription ColumnName="CustomerID" /> 
    </sfgrid:SfDataGrid.GroupColumnDescriptions> 
  
  
    <sfgrid:SfDataGrid.CaptionSummaryRow> 
        <sfgrid:GridGroupSummaryRow Title="Total Salary :{TotalSalary} for {ProductCount} members" 
        ShowSummaryInRow="True"> 
            <sfgrid:GridGroupSummaryRow.SummaryColumns> 
                <sfgrid:GridSummaryColumn Name="TotalSalary" 
                    Format="{}{Count}" 
                    MappingName="OrderID" 
                    SummaryType="CountAggregate" /> 
                <sfgrid:GridSummaryColumn Name="ProductCount" 
                    Format="{}{Count}" 
                    MappingName="EmployeeID" 
                    SummaryType="CountAggregate" /> 
            </sfgrid:GridGroupSummaryRow.SummaryColumns> 
        </sfgrid:GridGroupSummaryRow> 
    </sfgrid:SfDataGrid.CaptionSummaryRow> 
  
  
    <sfgrid:SfDataGrid.TableSummaryRows> 
        <sfgrid:GridTableSummaryRow Name="TableSummary" ShowSummaryInRow="False"> 
            <sfgrid:GridTableSummaryRow.SummaryColumns> 
                <sfgrid:GridSummaryColumn Name="TableSummary" 
                    Format="{}{Sum}" 
                    MappingName="OrderID" 
                    SummaryType="DoubleAggregate" /> 
                <sfgrid:GridSummaryColumn Name="TableSummary" 
                    Format="{}{Sum}" 
                    MappingName="Freight" 
                    SummaryType="DoubleAggregate" /> 
                <sfgrid:GridSummaryColumn Name="TableSummary" 
                    Format="{}{Sum}" 
                    MappingName="EmployeeID" 
                    SummaryType="DoubleAggregate" /> 
            </sfgrid:GridTableSummaryRow.SummaryColumns> 
        </sfgrid:GridTableSummaryRow> 
    </sfgrid:SfDataGrid.TableSummaryRows> 
</sfgrid:SfDataGrid> 
  
  
Regarding the Exporting to pdf the format of the groups are lost: 
  
We have checked your query. Unfortunately we are unable to reproduce the reported issue from our side. It is working fine as expected. Summary value export correctly to PDF. We have attached the tested sample link for your reference. You can download the same from the below link. If the issue still occurs from your side please revert us with modified sample with SfDataGrid product version, Xamarin.Forms version and device details. It will help us to provide the better solution.  
  
  
Regards, 
Sivaraman S 
 



DA David October 20, 2020 05:54 PM UTC


I get this when I try to download the file




SS Sivaraman Sivagurunathan Syncfusion Team October 21, 2020 03:56 AM UTC

Hi David, 

We are regret for the inconvenience caused. 

Please use the following link to download the sample. 


Regards, 
Sivaraman S 



DA David October 21, 2020 09:52 PM UTC

Good afternoon, I understood the example you sent, and it seems to me that the problem is that I use the: SfDataGrid.CaptionSummaryTemplate.
Would you have an example using the Template?


SS Sivaraman Sivagurunathan Syncfusion Team October 22, 2020 09:40 AM UTC

Hi David, 

Thanks for your update. 

We have checked your query. we cannot able to export the Template to PDF or Excel. since we cannot get the loaded views and draw them with the particular range, values etc from GridTemplateColumn and CaptionSummaryTemplate.  


Regards, 
Sivaraman S 



DA David October 22, 2020 03:42 PM UTC

Thanks for the answer, I already understood why it did not come out. So is there a way to add more than one GroupColumnDescription? to be able to put as head of the group the code of a person plus her name without using the template?


SS Sivaraman Sivagurunathan Syncfusion Team October 23, 2020 07:15 AM UTC

Hi David, 

Thanks for your update. 

We have checked your query. we suspect that, your requirement is need to customize the CaptionSummary Text with MultiGrouping. We have achieve your requirement. By set the GroupCaptionTextFormat and you can add the more the one GroupColumnDescription by setting the GroupingMode as Multiple. We have pared the sample based on your reduirmnt and attached for your reference. You can download the same from below link. 


Regards, 
Sivaraman S 



DA David October 27, 2020 01:50 PM UTC

Regarding the size of the summary, by setting ColumnSizer as None, the width is accommodated to the summary, but the other records such as the header are separated.


SS Sivaraman Sivagurunathan Syncfusion Team October 28, 2020 09:39 AM UTC

Hi David, 

Thanks for your update. 

We have currently check the feasibility to achieve the requirement in sample level. We will check and update the details on or before 30th October 2020. We appreciate your patience until then. 

Regards,
Sivaraman S 



SS Sivaraman Sivagurunathan Syncfusion Team October 30, 2020 07:36 AM UTC

Hi David, 

Thanks for your patience. 

We have checked your requirement  and prepared the sample based on your requirement. For that you have to write the custom CustomColumnSizer and calculate the table summary text width and set it as the column size  we have attached the sample for your reference. You can download the same from the below link.  


Regards, 
Sivaraman S 


Marked as answer
Loader.
Up arrow icon