Error in customizing CaptionSummaryCelleText in a WPF sfDataGrid

Hi,
I wrote a WPF app to manage a company Invoices and show them grouped by year, quarter and invoice type in an sfDataGrid. I tried to to customize CaptionSummaryCellText following the instructions in this link:
but got an error: "Object reference not set to an instance of an object"
My app is based on MVVM using PRISM framework, then the datagrid is shown in a PRISM dialog window, while
the custom method is located in the dialog window code-behind.

I send a zip file with a sample app similar to the original, it receives the same error, and a doc file with error messages and other useful informations.

Thank in advance for your help.

Giuanfranco Carrozzino



Attachment: TEST_APP_PRISM_WPF_SYNCFUSION_260ab93c.zip

5 Replies

SP Sreemon Premkumar Muthukrishnan Syncfusion Team July 8, 2024 03:28 PM UTC

Hi GIANFRANCO CARROZZINO,

We are currently checking the reported issue in our end. We need some time to validate, and we will update you further details on or before July 10, 2024. 

We appreciate your patience until then.

Regards,

Sreemon Premkumar M.



SP Sreemon Premkumar Muthukrishnan Syncfusion Team July 9, 2024 02:02 PM UTC

Hi GIANFRANCO CARROZZINO,

We have reviewed the sample you provided. In SfDataGrid, we initially add the cell renderers and assign its properties before loading the SfDataGrid. Also, when removing the cell renderer, we dispose its properties before adding the renderer. Since you removed and added the caption summary renderer in the Loaded event, the properties get disposed of and are not reassigned after loading. Therefore, you need to remove and add the custom cell renderer initially, before loading. Please find the code snippet below.

Code snippet:

 public PopupVATView()

 {

     InitializeComponent();

     sfdatagridVATInvoices.Loaded += SfDataGrid_Loaded;


     sfdatagridVATInvoices.CellRenderers.Remove("CaptionSummary");

     sfdatagridVATInvoices.CellRenderers.Add("CaptionSummary", new CustomCaptionSummaryCellRenderer());

 }


Output:



We have modified the sample with this change. Please find it in the attachment.

Regards,

Sreemon Premkumar M.


Attachment: TEST_APP_PRISM_WPF_SYNCFUSION_3c017ac3.zip


GC GIANFRANCO CARROZZINO July 10, 2024 07:58 AM UTC

Thanks for your help.

Trying to download WPF sample code from this link:

https://support.syncfusion.com/kb/article/3433/how-to-customize-the-captionsummarycell-text-in-wpf-datagrid

got:

Access Denied

You don’t have permission to access this file. The reason may be:
  • The incident associated with this file is not tied to the account you used to log in. To Logout use this link
  • Your enterprise portal admin has not allowed you to access other portal users’ incidents. Ask admin to change the support visibility in their Syncfusion profile 

How can I download this file?
Thanks.





SP Sreemon Premkumar Muthukrishnan Syncfusion Team July 11, 2024 03:19 PM UTC

Hi GIANFRANCO CARROZZINO,

Sorry for the inconvenience, we are currently preparing the sample based on the KB article, we need some time to achieve this. We will update you and the KB article with the sample on or before July 15, 2024.

We appreciate your patience until then. 

Regards,

Sreemon Premkumar M.



SP Sreemon Premkumar Muthukrishnan Syncfusion Team July 12, 2024 01:39 PM UTC

Hi GIANFRANCO CARROZZINO,


Thanks for your patience, we have prepared based on your requirement, please find the sample in the attachment. 

Output:


Regards,

Sreemon Premkumar M.


Attachment: SfDataGrid_CaptionSummary_Demoo_81c66342.zip

Loader.
Up arrow icon