My gird is bound to a datamodel and view with the notify property change. The grid is set to allow editing on single tap.
However, tapping on a cell will not go into editing mode. Data is loading into the grid and if I set an item in the datamodel it reflects in the Grid.
I was looking for a code example on the datagrid I could take a look at but I was not able to find one in the code samples of the site.
Hi Phunction,
Based on the details you provided, we have created a basic sample and conducted tests on our end. However, we were unable to reproduce the reported issue. The cells properly go to edit mode on tap. We have attached the sample that was tested on our end.
To facilitate a more effective resolution, we kindly request your assistance in modifying the attached sample to replicate the issue you are experiencing. Providing a sample that reproduces the problem will allow us to conduct a thorough investigation on our end and offer you a solution promptly.
Please make the necessary adjustments to the attached sample and include any specific steps or details that help highlight the reported issue. This collaborative effort will aid us in addressing the problem accurately and expeditiously.
Note: We have conducted tests using the latest DataGrid version 24.1.46 and .NET 8 on the Windows platform.
Regards,
Tamilarasan
I found out that I had to set SelectionMode="Single"
However, now I am getting crashes when debugging.
If you check the attached example, it is almost the same as yours, but you will notice when I try to add a new row on a button click, it will crash.
The new rows added during MainPage() will work, but as soon as a row is added on a button click it will crash.
However, it will only crash when SelectionMode="Single" is in the XAML code, remove that and it won't crash (you can't edit either however).
Attachment: MauiApp1_c8ed0c06.zip
Is there an update on this? I should also mention that setting SelectionMode in the code will also result in crashing when adding rows.
Hi Phunction,
Thank you for providing the issue-reproducible sample, and we've successfully tested it on our end. We have considered this as a bug and logged a bug report in our feedback portal. We will fix the reported issue and include the changes in our Volume 4 SP, which is expected to be rolled out on January 31, 2024. We will let you know once it is published. We appreciate your patience and understanding until then. You can also track the status of the bug using the feedback link below.
Feedback Link: https://www.syncfusion.com/feedback/50145/the-exception-is-thrown-when-adding-row-at-runtime-with-selection-mode
Disclaimer: Inclusion of this solution in the weekly release may change due to
other factors including but not limited to QA checks and works
reprioritization.
Regards,
Tamilarasan
Phunction,
We are glad to announce that our Essential Studio 2023 Volume 4 SP Release
V24.2.3 is rolled out and is available for download under the following link.
Furthermore, we are pleased to inform you that the reported issue has been successfully addressed. The fix has been included in our 2023 Volume 4 Service Pack (SP) release. Please update the DataGrid package to version 24.2.3.
https://www.nuget.org/packages/Syncfusion.Maui.DataGrid
We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you require any further assistance.
Regards,
Tamilarasan
Thanks, but I have another issue now. I am unable to delete data in the cell.
In the same example that I sent, if you try to delete a value in a column and press enter or tap to another cell, the value comes back. I can change the value, but I am unable to get rid of it.
So far it appears this only happens on numeric column types, string columns work fine.
Hi Phunction,
We have checked your query at our end, and we are able to replicate that issue at our end. We have considered this as a bug and logged a bug report regarding this in our feedback portal. We will fix the reported issue and include the changes in our upcoming weekly patch release, which is expected to be rolled out on February 20, 2024. We will let you know once released, and we appreciate your patience until then. You can also track the status of the bug using the feedback link below.
Feedback Link: https://www.syncfusion.com/feedback/50641/null-values-are-not-committed-for-numeric-column-after-editing
Regards,
Nirmalkumar
Phunction,
We are glad to inform you that the reported issue regarding the “Null values
are not committed for numeric column after editing” has been resolved. This fix
has been incorporated into our latest weekly NuGet release. To benefit from
this fix, we recommend updating your DataGrid to version 24.2.7.
https://www.nuget.org/packages/Syncfusion.Maui.DataGrid
Root Cause of the issue:
Assigning an empty string as a null value for a numeric column is not supported because string values are not compatible with numeric columns. As a result, edited null values may not be properly updated in the numeric column.
We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you require any further assistance.
Regards,
Tamilarasan