Spreadsheet - inserting multiline into cell value/text "Value cannot be null"

System.ArgumentNullException: 'Value cannot be null.

Parameter name: Children of 'System.Windows.Controls.UIElementCollection' cannot be null. Object derived from UIElement expected.'


Video and project in .7z



Attachment: exampl_8a9ff659.7z

2 Replies 1 reply marked as answer

VS Vijayarasan Sivanandham Syncfusion Team June 22, 2022 03:42 PM UTC

Hi James,

We are currently checking your reported problem with provided information and we need two more business days to validate this. We will update you with further details on June 24, 2022.

Regards,

Vijayarasan S



VS Vijayarasan Sivanandham Syncfusion Team June 24, 2022 03:41 PM UTC

Hi James,

The reported problem occurs due to the improperly renamed the worksheet in SfSpreadSheet.


However, you can resolve the reported problem by properly renaming the sheet programmatically in Spreadsheet like below mentioned code snippet,

if (workSheet == null)

{

        workSheet = spreadsheet.Workbook.Worksheets.Create(name);

}

else

{

        //here rename the sheet programmatically in Spreadsheet.

        spreadsheet.RenameSheet(workSheet.Name, name);

        workSheet.ClearData();

}


We have provided support to rename the sheet programmatically in Spreadsheet. Please refer to the below documentation for your reference,

UG Link: https://help.syncfusion.com/wpf/spreadsheet/worksheet-management#rename-a-worksheet-programmatically

Please find the modified sample in the attachment and let us know if you have any concerns in this.


Regards,

Vijayarasan S


Attachment: ModifiedSample_7c08a161.zip

Marked as answer
Loader.
Up arrow icon