It is impractical to set the grid columns to fixed width. I'll explain with example:
I have grid with 4 columns. The grid should have width 100%.
- Column 1: short text, 10-15 characters. I need this one to auto width to content.
- Column 2: checkbox, also auto-width to header title.
- Column 3: free text that may wrap on multiple lines. I need this column to use all available horizontal space so it will push the 4th column to the very right.
- Column 4: button. auto-width to either header title or button width, whichever is wider.
The auto-width feature is already requested: Autofit column widths on data load (telerik.com) but I don't see a feature request to handle the Column 3 scenario.
Hi Stefan,
I am happy to see you moving forward.
Our components are designed to plug into an existing layout, we do not aim to compete with bootstrap or to create complete layouts or design systems. The layout-type components we have tend to aim at providing functionality that is hard to get with CSS alone (say, resizing panes in a splitter with the mouse) or is otherwise a tad tricky in Blazor for a certain audience (say, basic grid or flexbox layouts for people coming from desktop development, and there are many such people using Blazor).
That said, building layouts with a certain CSS framework like Bootstrap is a very valid approach, and our components can go in and fill in functionality and user interaction.
Regards,
Marin Bratanov
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.
I'm converting Silverlight application to Blazor and finding it easier to build the layout with bootstrap than with Telerik layout components. And Yes, I ended up creating a <table> with @foreach loop because I just couldn't use the Telerik Grid component.
Hello Stefan,
Pehaps for such a task it would be easier for you to just create a <table> in your own code and do a @foreach loop for the rows. For things like sorting, filtering and paging we offer the Telerik.DataSource as a standalone package so it does not depend on the grid (see more here), and in the future there will also be a standalone Filter component (if you are interested in that, click the Vote and Follow buttons).
Regards,
Marin Bratanov
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.
Hi Stefan,
Once all columns have widths in pixels, the last column that has no explicit width will take up the available space, this is the standard <table> behavior of browsers that you can read more about here: https://docs.telerik.com/blazor-ui/components/grid/columns/width.
I am going to have to mark this as "declined" however, because it is not something that the grid can choose to do on its own - such behavior is not deterministc (read, heuristic, and we can't have unpredictable/heuristic behavior). Here are a few reasons why:
Regards,
Marin Bratanov
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.