Column Reordering Indexes

1 Answer 30 Views
Grid
Alex
Top achievements
Rank 1
Alex asked on 11 Nov 2024, 04:25 PM

Hi,

I'm working on a solution for my team's grid implementation. We need to prevent certain columns from being reordered into the last column position if that last column is designated as immovable. Is there a way to retrieve the target index of where a column is being moved to, so we can conditionally restrict reordering?

Thank you!

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 12 Nov 2024, 09:30 AM

Hello Alex,

You can use the orderIndex of the columns to determine the new order. You can also lock the last column and use the approach demonstrated in the following example (with a small modification by changing the sort order) or you can manually ensure that you put the last column with the highest orderIndex after the reordering:

The above example uses the locked functionality and the custom code ensures that no column can be put before the locked columns.

Hope this helps.

 

Regards,
Konstantin Dikov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Alex
Top achievements
Rank 1
commented on 12 Nov 2024, 02:35 PM

Hi Konstantin,

I appreciate the response. I'll give this a go, thanks for the help!

Tags
Grid
Asked by
Alex
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or