Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant