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

How to use Server-Side Row Model for ag-Grid #46

Open
maxkoretskyi opened this issue Aug 31, 2023 · 2 comments
Open

How to use Server-Side Row Model for ag-Grid #46

maxkoretskyi opened this issue Aug 31, 2023 · 2 comments

Comments

@maxkoretskyi
Copy link

maxkoretskyi commented Aug 31, 2023

This example of how to use ipyaggrid shows the initialization of the agGrid with a fully loaded data (frame), which corresponds to the client-side row model.

g = Grid(grid_data = data, grid_options=grid_options, export_mode="buttons", theme='ag-theme-balham')

Does ipyaggrid support agGrid in the Server-Side Row Model? If so, where can I read about it? If not, could you give me some guidelines on what I should do to enable it?

I've studied the sources a little. Seems like that this use case is not supported. Inside widget_builder.js seems to be the only place where you inject the data:

    // instantiate grid
    const grid = new Grid(gridDiv, gridOptions);
    window.grid = grid;

    // inject gridData
    gridOptions.api.setRowData(gridData);

Maybe under your guidance I could implement the support for the SSR mode for agGrid and create a PR? Since agGrid's SSR model basically requires just a datasource object with getRows method, we could create it in python env and pass it to Grid during the instantiation

g = Grid(datasource= ds, 
@mariobuikhuizen
Copy link
Contributor

You're correct that ipyaggrid currently doesn't support agGrid's Server-Side Row Model. It's an area that we think would benefit the package, and we appreciate your interest in contributing.

Given the potential complexities of implementing this feature, we think that creating a new widget specifically for this functionality would be the most prudent approach. This would allow us to maintain compatibility for users who are already using the existing Grid widget.

While our team may not have the bandwidth for extensive guidance, we're definitely open to receiving a PR.

@maartenbreddels
Copy link
Contributor

To clarify, the new widget could live in the ipyaggrid package as a new widget, it does not need to be a new ipywidget library/package.

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

3 participants