Blazorise icon indicating copy to clipboard operation
Blazorise copied to clipboard

Datagrid columns reorder

Open Rem962 opened this issue 1 year ago • 3 comments

Hi :)

Given a datagrid we want to give users the possibility to set columns in the order they want and save it as preference somewhere.

Most common solution is a drag&drop on columns but right now it is not possible with blazorise.

So

  • either giving drag&drop events on columns so we can manage ourself actions while drag&drop
  • or getting the datagrid manage completely the reorder feature and have the possibility to 2way bind a DisplayOrders dictionnary to handle columns order ?

Any plan for this ? Having to develop our own datagrid just because of this feature sounds not good Thank you :)

Rem962 avatar Aug 22 '24 05:08 Rem962

What are your thoughts in being able to reorder by using the column chooser? https://blazorise.com/docs/extensions/datagrid/features/column-chooser

David-Moreira avatar Aug 22 '24 07:08 David-Moreira

Having the reorder on the column chooser would be the easy path. But from a UX perspective, it would be better on the column drag-and-drop.

@Rem962 While not what you want ATM, you can use DisplayOrder parameter on DataGridColumn.

stsrki avatar Aug 22 '24 08:08 stsrki

Having the reorder on the column chooser would be the easy path. But from a UX perspective, it would be better on the column drag-and-drop.

@Rem962 While not what you want ATM, you can use DisplayOrder parameter on DataGridColumn.

I first wanted to use this DisplayOrder but then there is no easy way for user to change order since columns cannot be drag&drop :)

Rem962 avatar Aug 22 '24 08:08 Rem962

I have also been looking for a way that I can alow for users to set custom column orders and persist this in the database. Drag & Drop would be ideal, but beig able to use the Column Chooser do reoder would be the next best.

pvagnini avatar Apr 28 '25 00:04 pvagnini

@tesar-tech can you investigate and see if it could be an easy feature to do? Or we would postpone in for later.

stsrki avatar Apr 28 '25 07:04 stsrki

Yep. Will look into it.

tesar-tech avatar Apr 28 '25 07:04 tesar-tech

Also would love to have this feature. I agree that moving the columns within the column chooser would be the best.

mtbayley avatar May 26 '25 19:05 mtbayley

Here is a first try #6126

If anyone is willing to try locally, we're more than open to any comments.

stsrki avatar May 27 '25 12:05 stsrki