Skip to content

Conversation

berslen
Copy link

@berslen berslen commented Nov 12, 2024

When cell values populated with different types of Objects, code was determining if convertToString by checking the first element in the list. But when there is different type of object for example StrongType it was failing to sort and it was throwing error on String's compareTo methdod.

Example case:
image

@abineshPalanisamy
Copy link

Hi @berslen ,

We have reviewed the code changes in your pull request. In your pull request, you are checking the type of each cell value. In SfDataGrid, however, the cell values in a column should have a consistent type across the entire column. Therefore, instead of checking each cell individually, we only check the type of the first cell. Checking the type for each cell can cause performance issues, particularly when sorting is performed.

To assist you further with your query, could you please provide more details about your requirements?. Specifically, we would like to understand the reason for checking the cell type of each cell. Any additional information you can provide would be greatly appreciated, as it will help us offer a more precise and effective solution.

Regards,
Abinesh P

@ashok-kuvaraja ashok-kuvaraja added data grid Data grid component waiting for customer response Cannot make further progress until the customer responds. labels Nov 14, 2024
@berslen
Copy link
Author

berslen commented Nov 15, 2024

Hi @berslen ,

We have reviewed the code changes in your pull request. In your pull request, you are checking the type of each cell value. In SfDataGrid, however, the cell values in a column should have a consistent type across the entire column. Therefore, instead of checking each cell individually, we only check the type of the first cell. Checking the type for each cell can cause performance issues, particularly when sorting is performed.

To assist you further with your query, could you please provide more details about your requirements?. Specifically, we would like to understand the reason for checking the cell type of each cell. Any additional information you can provide would be greatly appreciated, as it will help us offer a more precise and effective solution.

Regards, Abinesh P

Table throws exception when all cell values are not same type. In the example screenshot you can see string values and custom cell data model. When sorting comes up to that it can't compare with string because they are different types and custom cell data model is not converted to string. İt's a major issue if you are using strong type as cell's.

@SethupathyD
Copy link

Hi @berslen ,

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 December 10, 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: 63260

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,
Sethupathy D.

@abineshPalanisamy
Copy link

Hi @berslen ,

We regret to inform you that we are unable to resolve the reported issue due to the inherent behavior of our DataGrid. In SfDataGrid, all cell values within a column must be of a consistent type. Using different types of cell values in the same column can lead to improper functionality of features like sorting, filtering, and other operations. This limitation arises because the compare method in Dart expects objects of the same type for comparison during sorting operations.

Therefore, we cannot classify this as a bug on our side. Maintaining a consistent cell type within a column ensures that the DataGrid can correctly compare values for sorting and filtering. Allowing dynamic cell types within a single column makes it challenging to perform these operations effectively. As a result, ensuring consistent cell types across a column is essential in SfDataGrid.

Regards,
Abinesh P

@ashok-kuvaraja
Copy link
Collaborator

Hi @berslen,

We are closing this issue. If you need any further assistance, please reopen this. We are always happy to help.

Regards,
Ashok K

@ashok-kuvaraja ashok-kuvaraja removed the waiting for customer response Cannot make further progress until the customer responds. label Dec 13, 2024
@sfHariHaraSudhan sfHariHaraSudhan added the invalid This doesn't seem right label Jul 7, 2025
@syncfusion syncfusion locked and limited conversation to collaborators Jul 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

data grid Data grid component invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants