Change column collection items order on reording the column in the UI of RADgridview wpf.

1 Answer 380 Views
Miscellaneous
Piyush
Top achievements
Rank 1
Piyush asked on 15 Aug 2021, 10:19 AM
When i am reording the column in radgridview WPF UI than the column collection items order in gridview is not changed.

How can i save the column latest order changed by the user in radgridview and display the same in the UI when the user opens.

My finding : "Column collection items order is not changed when i change the columns in ui of RADgridview ".

Can you please tell how can i save the latedst column order changed by the user in the UI.

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Accepted
Dilyan Traykov
Telerik team
answered on 18 Aug 2021, 12:49 PM

Hello Piyush,

Indeed, when the columns are reordered via the UI, this does not change the order of the items in the Columns collection of the control. The way to distinguish this change is via the DisplayIndex property of the columns.

A good example of how to save this layout and load it back can be found in the "GridView Serialization" demos in the WPF examples application and in our SDK Samples Browser. You can test this by saving the layout by pressing the "Save" button, reorder the columns and then click the "Load" button. You will notice that the order of the columns is brought back to the point when the Save button was clicked.

Can you please have a look and let me know if these demos provide the expected behavior? I will be awaiting your reply.

Regards,
Dilyan Traykov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Piyush
Top achievements
Rank 1
commented on 18 Aug 2021, 04:17 PM

Thank you Dilyan for the support.

Request:
please going forward please do not share the code in this sample browser. bcs i am not allowed to install any application in my pc.

Thank you
Dilyan Traykov
Telerik team
commented on 19 Aug 2021, 07:44 AM

Thank you for your feedback.
We will keep your request in mind in future communications. Just to clarify, the source code of the SDK examples can also be found in our GitHub repository.
For your convenience, I'm attaching the referenced example.
Please let me know if you find it helpful.
Piyush
Top achievements
Rank 1
commented on 19 Aug 2021, 02:26 PM | edited

thank you for the support

 

Tags
Miscellaneous
Asked by
Piyush
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or