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

QScrollingGrid #956

Open
spekary opened this issue Apr 15, 2016 · 0 comments
Open

QScrollingGrid #956

spekary opened this issue Apr 15, 2016 · 0 comments

Comments

@spekary
Copy link
Member

spekary commented Apr 15, 2016

Datatables has an extension that allows a table to scroll and dynamically update its data. I would like to see something like this as an extension to QDataGrid2.

Scrolling:
Two possible approaches:

  1. To use the built-in scrolling ability of a div, Javascript has to be able to calculate the height of the entire table. This implies each cell being the same height. Inside the scrolling div is the painting div, which shows just the data that is visible, and possibly some data before and after the visible area.
  2. Or, to be able to do a table with variable height items, we would also need to create custom scroll bar. The scrollbar scrolls by items, rather than pixels. Drag scrolling would scroll by pixels. Complex, but doable.

This would also imply a change to how the grid is drawn. Instead of drawing the entire table in html, an approach similar to data tables would be needed that first draws a shell of the table, and then uses ajax to ask the server for the data in the cells corresponding to particular rows. This has the added benefit that if the data is watched, the entire table does not need to be redrawn, but just the data inside the table. Doing this would preserve the scroll setting.

@spekary spekary added this to the Future milestone Apr 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant