Component for reordering list

I need to reorder, re-sequence a list - similar to moving navigation items up/down using arrows in Panel Menu - Items.

Is there a component that supports this or do you have a code sample?

I would prefer drag and drop but up/down arrows would be OK.

Thank you.

There is no such component in Radzen.Blazor components.

Hi @woody2,

Only you need an order line field in your table.
In RadzenGrid you can add a field for reordering and two buttons. One button will call the UP function and the other one will call the DOWN function.


Radzen grid looks like that

image
Click the 3dots for edit columns


Add a new column without field and create a template
image
Add your buttons
image
Add your events

The UP function will change the active record's orderLine field to (n -1) and the previous record orderLine field to (m+1). You need to an exception for the first record (This record can't move up).

The DOWN function will work vice versa. The exception must work for the last record.

And your RadzenGrid's data source needs an ordering parameter for the orderLine field.

I hope this will help you,
KB

Thanks KB! I will try that.