I need to change height of Master/Detail row while expanded i.e. after clicking on some button. I got to the point where I set new height like this.gridOptions.detailRowHeight = 100;. I just don't know how should I refresh grid to display master/detail with changed height. I tried api.resetRowHeights(), but it seems to be only affecting 'parent' rows, not expanded ones (master/detail).
Related
When using ag-grid with a cell renderer which has autoHeight=true, the grid renders the rows initially with a set height that looks to be ~40 or 50px, then calculates the height and re-renders the rows with the correct height. I'm wanting to avoid the jump/stutter in the screen caused by the resize and ideally hold off rendering a given row till the height is calculated.
This defect started popping up when upgrading from v25-> v28 of ag-grid.
This Stackblitz Example shows an MVP of this issue. Effectively setting auto height on a cell renderer. To see the issue, you may need to cause the output to refresh (save a code change).
In ag-grid, the value of domLayout can be set to autoHeight in order to disable vertical scrolling of the ag-grid panel. Instead, the entire page adapts its height to show all the rows.
How can I have the same behavior for the horizontal scrolling?
There is the suppressHorizontalScroll option when set to true hides the horizontal scroll bar, but this doesn't force the entire page to have a scroll. Instead, the overflowing content is just hidden.
you can do this to some extent by juggling the minWidth, maxWidth, and width attributes on your columns while setting the width of the columns automatically based on their content using the gridColumnApi.autoSizeColumns(colId) method.
I say to some extent because it is quite hard, with agGrid, to set different row sizes for rows with certain cells having a lot of text or big images in them. This would force some columns to expand to accommodate for the content, or just clip it completely. Thus forcing the horizontal scroll.
Note : for the method above to work, you need to call gridColumnApi.autoSizeColumns(colId) after you get your rows setUp.
I'm trying to produce a widget like this below to be contained inside of a listview. I have managed an effect like this rather simply based on the example given on the flutter website for YouTube. However, the part I'm struggling with is that I would like the image to resize vertically depending on how large the text is.
Currently this is created with a row. If possible I'd like to set the row height somehow but only dependent on the height of the text. As some elements will have more text and some will have less I would like to have the image fill the vertical space so the height is the same as the text height.
I basically want this - https://api.flutter.dev/flutter/material/ListTile-class.html#material.ListTile.4
but where the image height on the left matches the text height on the right
Thanks in advance!
From what I understand the DataGrid auto resizes the columns.
What I would like is DataGrid to respect the column widths I set, and to show the horizontal scrollers accordingly. Is there a way to achieve this?
DataGrid gives you complete control over the width of its columns.
For example, if you set the width of all columns in pixels except for one column which has a width equal to 100%, then all columns will have exactly the width you specified, except for the percentage column which will shrink or expand based on the width of a DataGrid itself. If you want all columns to have fixed width, then you should set the width of the entire DataGrid explicitly in pixels.
There is also an important .setMinimumTableWidth method. You can use it to tell the DataGrid that it can resize with the width of its parent container, but never be smaller than a certain number of pixels. In this case, if a parent container is too small to accommodate all columns at their desired width, the horizontal scrollbar will appear.
I have a CellList which will have fix number cells in one page, i would like the cells extend to fill the whole CellList.
Suppose the CellList height is 100px, the cell number is 10, then one cell/row will be 10px, if the CellList height is 500px, each cell/row's height will be 50px.
The problem is, how to control the row height after table rendered, i tried to addLoadingStateChangeHandler on cell list and when onLoad i use GQuery to resize the cell height, but seems no effect.
Yes i can get each row's height beforehand, but how to apply to the CellList's CSS?
Any ideas on this?
Problem solved, when creating a new cell, specify its height(because we know the height beforehand), when resizing the CellList, just redraw it by specifying a new height.