FluentDataGrid with Dynamic Columns and resizing #1552
Replies: 2 comments
-
I might have a workable solution. Not for the resizable columns scenario, but for fixed columns. I created a Dictionary mapping a ColumnName -> an object containing a Width string, and Visible boolean.
Then I've pointed
This way, whenever I check/uncheck a column, the table re-renders and uses the correct set of widths for the GridTemplateColumns. So far seems to work great. I would like to be able to use Resizable columns here though, if anyone can suggest a fix for that. |
Beta Was this translation helpful? Give feedback.
-
I have a very simple use case with similar problem. I solved with this workaround
but this may be fixed better... |
Beta Was this translation helpful? Give feedback.
-
I'm building a page with dynamic columns. My original design (with static columns) had resizable columns on the table, which worked great. However, introducing dynamic columns introduces rendering bugs. (I get stray / weird content rendered as the columns are resized or toggled on/off. Or the resizing gets in a weird state and stops working).
I have disabled the resizable columns, but I'm left with a table who's columns stay in their previously rendered size when I'm hiding columns.
Is there any way to trigger the DataGrid to recalculate column widths after I show/hide columns?
My default view:
After hiding some columns (notice the first overflowing column is still too small to show all contents)
Basically I would like to trigger some re-render so the table displays with the now-visible columns consuming the full available table width.
Beta Was this translation helpful? Give feedback.
All reactions