Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

DataGrid not scrolling within ScrollPane #1331

Open
ben-dent opened this issue Jun 8, 2021 · 0 comments
Open

DataGrid not scrolling within ScrollPane #1331

ben-dent opened this issue Jun 8, 2021 · 0 comments

Comments

@ben-dent
Copy link

ben-dent commented Jun 8, 2021

I have a project where I am using a DataGrid and it is very important that cells stay in the rows they were originally intended to be in (as it is rendering a data structure).

As the number of items in the DataGrid gets large, the available width starts being an issue. To combat this, I placed the DataGrid inside a ScrollPane. However, once the maximum number of cells that can be rendered in one line is reached (in my current case, this is 6), instead of allowing the DataGrid width to increase, allowing for scrolling, the component realises that it cannot fit more in the row and begins a new row. For the example I was trying, I had set maxCellsInRow to 7 at that point

private val data = foo
...
scrollpane {
    datagrid(data) {
        ...
        maxCellsInRow = gettingMaxCellsFromAnotherClass()
    }

    isFitToWidth = true
}
...

Is there some way to force the number of cells in the row, allowing for scrolling?

TIA

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant