OrderIndex duplicate values #602

Closed
opened 2026-01-29 17:40:06 +00:00 by claunia · 7 comments
Owner

Originally created by @PeterViau on GitHub (Oct 26, 2022).

When saving Radzen.DataGridSettings Orderindex can have duplicate value causing columns to be in the wrong order when reloading Radzen.DataGridSettings

example from json

"Property": "RandomName",
"Visible": true,
"Width": "263px",
"OrderIndex": 2,
"SortOrder": null,
"FilterValue": null,
"FilterOperator": 6,
"SecondFilterValue": null,
"SecondFilterOperator": 0
},
{
"Property": "AnotherName",
"Visible": true,
"Width": "217px",
"OrderIndex": 2,
"SortOrder": null,
"FilterValue": null,
"FilterOperator": 6,
"SecondFilterValue": null,
"SecondFilterOperator": 0

Originally created by @PeterViau on GitHub (Oct 26, 2022). When saving Radzen.DataGridSettings Orderindex can have duplicate value causing columns to be in the wrong order when reloading Radzen.DataGridSettings example from json "Property": "RandomName", "Visible": true, "Width": "263px", **"OrderIndex": 2,** "SortOrder": null, "FilterValue": null, "FilterOperator": 6, "SecondFilterValue": null, "SecondFilterOperator": 0 }, { "Property": "AnotherName", "Visible": true, "Width": "217px", **"OrderIndex": 2,** "SortOrder": null, "FilterValue": null, "FilterOperator": 6, "SecondFilterValue": null, "SecondFilterOperator": 0
Author
Owner

@enchev commented on GitHub (Oct 27, 2022):

Any idea how to reproduce this?

@enchev commented on GitHub (Oct 27, 2022): Any idea how to reproduce this?
Author
Owner

@PeterViau commented on GitHub (Oct 27, 2022):

I loaded a test app without restoring Radzen.DataGridSettings, resized a couple of columns and then moved one ahead of the second one and this is what I get:

Columns": [
{
"Property": null,
"Visible": true,
"Width": "35px",
"OrderIndex": 0,
"SortOrder": null,
"FilterValue": null,
"FilterOperator": 0,
"SecondFilterValue": null,
"SecondFilterOperator": 0
},
{
"Property": "One",
"Visible": true,
"Width": "184px",
"OrderIndex": 1,
"SortOrder": null,
"FilterValue": null,
"FilterOperator": 6,
"SecondFilterValue": null,
"SecondFilterOperator": 0
},
{
"Property": "Two",
"Visible": true,
"Width": "237px",
"OrderIndex": 2,
"SortOrder": null,
"FilterValue": null,
"FilterOperator": 6,
"SecondFilterValue": null,
"SecondFilterOperator": 0
},
{
"Property": "Three",
"Visible": true,
"Width": "287px",
"OrderIndex": 2,
"SortOrder": null,
"FilterValue": null,
"FilterOperator": 6,
"SecondFilterValue": null,
"SecondFilterOperator": 0
},

@PeterViau commented on GitHub (Oct 27, 2022): I loaded a test app without restoring Radzen.DataGridSettings, resized a couple of columns and then moved one ahead of the second one and this is what I get: Columns": [ { "Property": null, "Visible": true, "Width": "35px", "OrderIndex": 0, "SortOrder": null, "FilterValue": null, "FilterOperator": 0, "SecondFilterValue": null, "SecondFilterOperator": 0 }, { "Property": "One", "Visible": true, "Width": "184px", "OrderIndex": 1, "SortOrder": null, "FilterValue": null, "FilterOperator": 6, "SecondFilterValue": null, "SecondFilterOperator": 0 }, { "Property": "Two", "Visible": true, "Width": "237px", "OrderIndex": 2, "SortOrder": null, "FilterValue": null, "FilterOperator": 6, "SecondFilterValue": null, "SecondFilterOperator": 0 }, { "Property": "Three", "Visible": true, "Width": "287px", "OrderIndex": 2, "SortOrder": null, "FilterValue": null, "FilterOperator": 6, "SecondFilterValue": null, "SecondFilterOperator": 0 },
Author
Owner

@enchev commented on GitHub (Oct 31, 2022):

Hi @PeterViau,

Can you try the same on our demo and let me know exact order of actions. Unfortunately I was no able to reproduce this so far.
https://blazor.radzen.com/datagrid-save-settings

@enchev commented on GitHub (Oct 31, 2022): Hi @PeterViau, Can you try the same on our demo and let me know exact order of actions. Unfortunately I was no able to reproduce this so far. https://blazor.radzen.com/datagrid-save-settings
Author
Owner

@PeterViau commented on GitHub (Oct 31, 2022):

That demo doesn't seem to be responsive today (no sorting,grouping etc...)

https://blazor.radzen.com/datagrid-save-settings

@PeterViau commented on GitHub (Oct 31, 2022): That demo doesn't seem to be responsive today (no sorting,grouping etc...) https://blazor.radzen.com/datagrid-save-settings
Author
Owner

@enchev commented on GitHub (Nov 1, 2022):

You might need to clear your application cache:
image

@enchev commented on GitHub (Nov 1, 2022): You might need to clear your application cache: ![image](https://user-images.githubusercontent.com/5804953/199246003-baf8ffaf-d635-4295-8b9e-4f0305adb36f.png)
Author
Owner

@PeterViau commented on GitHub (Nov 1, 2022):

Using your online demo and moving a couple of columns
image

@PeterViau commented on GitHub (Nov 1, 2022): Using your online demo and moving a couple of columns ![image](https://user-images.githubusercontent.com/80265322/199276926-f98d333a-efec-4219-90b7-9e1720d3823a.png)
Author
Owner

@enchev commented on GitHub (Nov 3, 2022):

I give up. I'm unable to reproduce such problem using your instructions:
image
image

If you think there is a problem, you can reproduce it at your end and you have a fix feel free to submit pull request.

@enchev commented on GitHub (Nov 3, 2022): I give up. I'm unable to reproduce such problem using your instructions: ![image](https://user-images.githubusercontent.com/5804953/199663586-a7771ddc-3d8a-4c70-87e3-90fdf729db82.png) ![image](https://user-images.githubusercontent.com/5804953/199663540-579e59a7-0052-459f-b378-cf8530918daa.png) If you think there is a problem, you can reproduce it at your end and you have a fix feel free to submit pull request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#602