Grid reordering not working if column orderIndex is defined

1 Answer 563 Views
Grid
Jega
Top achievements
Rank 1
Iron
Iron
Jega asked on 11 Jun 2021, 02:47 PM

Hi,

We have grid with n number of columns with defined orderIndex for each column.

Also we want the ability to reordering column in user interface. onColumnReoder event triggers but reordering is not working.

It would be helpful if you provide working example.

Thanks,

Vignesh

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 14 Jun 2021, 06:57 AM

Hello, Jega,

This is expected as the orderIndex puts the columns in a controlled mode. This means that the orderindex is with the highest priority.

The new orderIndex will be available in the onColumnReoder and the state of the columns has to be updated.

I made an example that shows how the have orderIndex on the columns and update them with reordering:

https://stackblitz.com/edit/react-zkd6ak-pruz2g?file=app/main.jsx

Regards,
Stefan
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.

Tags
Grid
Asked by
Jega
Top achievements
Rank 1
Iron
Iron
Answers by
Stefan
Telerik team
Share this question
or