Adjusting Vaadin grid height - vaadin

I am trying to add multiple Vaadin grids of different sizes inside a VerticalLayout container.
public class Overview extends VerticalLayout {
Grid<DataTable1> grid1 = new Grid<>();
Grid<DataTable12> grid2 = new Grid<>();
Grid<DataTable13> grid3 = new Grid<>();
}
So far, each grid is taking up an equal amount of vertical space, as shown in the image below.
grids taking equal vertical space
However, I would like to show the grid as shown in the image below where the height gets dynamically adjusted as per the number of rows and cloumns:
desired grids
Is there any way I can adjust the individual grid height?
So far I have found a way to adjust the row height not the height of the whole grid itself.
Thank you!

Sounds like you might be looking to achieve dynamic height based on the number of rows, which can be done using setAllRowsVisible(true): https://vaadin.com/docs/latest/components/grid/#dynamic-height

The Grid, like all components that implement HasSize, has a method setHeight()

Related

CollectionVIew dynamic calculation width, item display is incomplete

The UICollectionView uses the calculated item attribute (estimatedItemSize) to calculate the width of the item and the layout of the Masonry used by UICollectionViewCell.m. As a result, the last Item cannot be pulled and the display is incomplete. Modifying contentInset has no effect.
Directly fixed item size can be completely displayed, guessing that the dynamic calculation does not calculate the width.
Code:
MainViewController:
HeaderCollectionView:
HeaderViewCell:

Horizontal full width scroll in flutter

Flutter Listview component uses scrollDirection to do horizontal scrolling.
How do i set the width of the individual items to window width and scroll one page at a time?
You may want to use a PageView instead of a ListView as it works just like you described. It fits better your purpose because you don't have to write all the logic to manage the threshold of the pages and it automatically allocates the entire screen width for each element.

How to make table view horizontally engage full width

I'm developing an ios application which has a table view. when there is a long value in table cell, table column width size should be increase. I've develop a custom UI for this requirement as following images.
I have change the content size using following code, but it isn't increase
the table body size. you can see it in following image.
self.resultTableView.contentSize.width = self.cellWidth!
You can see the first image its appear as it is and when there is more indexes (columns) and user try to scroll horizontally towards right(as shown in second image), table view will not expand more than the viewport size.
How can I do table view fit to the scroll size?
and finally everything become invisible.
feel free to ask anything if you dont clear enough the quection.
I guess what you have to do is dynamically calculate the desired width and then set the tableView width (for example with a tableView.widtAnchor) to exactly this width.
For a table that scrolls into both dimensions, this could also be helpful:
http://www.brightec.co.uk/ideas/uicollectionview-using-horizontal-and-vertical-scrolling-sticky-rows-and-columns

Blank UI when adding charts to a container in codename 1

How to add 4 charts on the same form using a tablelayout.
i tried adding a chart to a container nothing comes out. please help
The charts return no preferred size so the layout code sizes them to zero. This was fixed for the next update but you probably won't get what you want here.
I'm assuming that what you want to use is a 2x2 grid layout which will give every cell exactly the same size. Alternatively you can add the charts with a TableLayout constraint that gives it 50% width/height so it occupies the space properly.

How to auto-size a DevExpress TcxGrid

I've created a table from a TcxGrid with a simple table view. The data is being poked into the table using DataController.Values[n,m] as a simple string and I have some 10 columns that will show various string widths.
The problem that I'm having is getting a table that has a horizontal scroll bar AND has auto-sized its columns. If I set CellAutoWidth true this fits all columns into the display width (with no scroll bar) but if I set it false, I get a scroll bar but columns of my default width and my data strings are truncated.
Could some kind person tell me how to get a horizontal scroll bar AND get each column to adjust its width to fit its max data width please?
Thanks
Brian.
Maybe it's enough to call YourGridView.ApplyBestFit instead of using CellAutoWidth.
You need to set columns BestFitMaxWidth and MinWidth property and make sure you have the width of the Datasets TField also set (if you are using DataSets).
Then, you can call YourGridView.ApplyBestFit;

Resources