I use new Angular Material. This code produce grid with two columns:
<md-grid-list cols="2" rowHeight="10">
<md-grid-tile></md-grid-tile>
<md-grid-tile></md-grid-tile>
</md-grid-list>
How to set 20% width to first columns and remaning 80% to second?
Make sure that the sum of col span is equal to cols Size. Show activity on this post. @Venetian Village.. you can devide the width of browser with the row class of CSS. Here height :100vh is taking complete the browser window height or if you want use parent's div use height: 100% .
The height of the rows in a grid list can be set via the rowHeight attribute. Row height for the list can be calculated in three ways: Fixed height: The height can be in px , em , or rem . If no units are specified, px units are assumed (e.g. 100px , 5em , 250 ).
The Angular Data Grid component is a feature-rich control for displaying data in a tabular format. Its wide range of functionalities includes data binding, editing, Excel-like filtering, custom sorting, grouping, row reordering, freezing rows and columns, aggregating rows, and exporting to Excel, CSV, and PDF formats.
Try this:
<md-grid-list cols="10" rowHeight="2:1">
<md-grid-tile colspan='2'>1</md-grid-tile>
<md-grid-tile colspan='8'>2</md-grid-tile>
</md-grid-list>
you need to read this documentation: https://material.angular.io/components/grid-list/overview
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With