Auto-size column width in Blazor-wasm based on both header and data width

Answered
Brent Minder asked on March 8, 2024

I'm using:

razor.cs:
private async Task AutosizeColumnsAsync(){
await JSRuntime.InvokeVoidAsync("autosizeColumns");
}

and
window.autosizeColumns = function () {
flexmonster.autosizeColumns();
};

To  autosize grid columns which seem to be based on the column data only. Is there a way to include the header size as well including the gear filter that overlaps the header? (see attachment)
If not, can i override the column widths that need more adjustment?
 
 

Attachments:
column-sizing.png

4 answers

Public
Maksym Diachenko Maksym Diachenko Flexmonster March 12, 2024

Hello, Brent!

Thank you for your question.

The behavior of headers overlapping the gear icon is not Flexmonster's default behavior.  It is possible that this behavior was caused by some changes made to the component's CSS by some of the CSS rules or the customizeCell function. Also, kindly note that Flexmonster does not have the autosizeColumns() method in it's API.

Considering the information above, could you please provide the code example where the issue can be reproduced? This would greatly help us to investigate the issue and provide a possible solution.

Best Regards,
Maksym

Public
Maksym Diachenko Maksym Diachenko Flexmonster April 24, 2024

Hello, Brent!

Hope you are doing well.
We are wondering if you were able to solve the issue with the header overlapping the gear icon.
Please let us know if you need any further assistance.

Best Regards,
Maksym

Public
Brent Minder April 24, 2024

We're customizing the widths of all columns on the report which is working for us. Thanks.

Public
Maksym Diachenko Maksym Diachenko Flexmonster April 25, 2024

Hello, Brent!

Thank you for your feedback.
We are glad to hear that the column resizing works fine for you.
Feel free to contact us if more questions arise.

Best Regards,
Maksym

Please login or Register to Submit Answer