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

Grouping and Filtering on Remote - Sub rows not always rendering #20

Closed
slat opened this issue Mar 1, 2014 · 3 comments
Closed

Grouping and Filtering on Remote - Sub rows not always rendering #20

slat opened this issue Mar 1, 2014 · 3 comments
Labels

Comments

@slat
Copy link

slat commented Mar 1, 2014

Steps to reproduce:

  • Load remote grid
  • Right click Name column, Quick filter by: "Cristina"
  • Right click Name column, Group by Name
  • Collapse the first, second, then third group. (Wait for load mask to complete for each expand)
  • On the third group expand the load mask will get stuck and the cells will not be populated.

There are other ways to replicate this and it doesn't seem to matter what order grouping and filtering are applied.

This is occurring on the latest production Chrome & Firefox on Windows.

I was hoping to see some console feedback for ajax requests on loading data to see how frequent requests would be and what would be required on the server side (database queries).

@EvHaus
Copy link
Owner

EvHaus commented Mar 2, 2014

Firstly, thank you for trying out the grid.

I'm having trouble reproducing the issue you're describing. I've just updated the demo page to the latest build, does it still happen there? http://www.dobyjs.com/grid/examples/#remote

As for viewing the remote request -- the demo doesn't use real AJAX requests right now as we'd need to setup a server that feeds real data for it. We will eventually.

@slat
Copy link
Author

slat commented Mar 2, 2014

Thanks for updating the demo, this isn't an issue anymore.

I put a break point in remote.js to see where the ajax requests would be happening. It seems that I would need to implement multi sorting, limit and offset on my result set and a method to return all unique results for grouped & nested group column values. And because of the additional ajax request probably be restrictive on what columns are allowed to be grouped so the query result wouldn't be too large.

Overall, I am very impressed - Thank you. I might trial it soon with some real data.
Looks like I can use "options.formatter" for setting a grouping formatter?
Filter glyphs for the column headers may be useful as the filter row can be hidden with filters still applied.

@EvHaus
Copy link
Owner

EvHaus commented Mar 2, 2014

If you look on https://github.com/globexdesigns/doby-grid/wiki/Remote-Data you'll see that remote fetching requires three different functions. One to fetch counts, one to fetch data and one to fetch grouping data if you want to support that. As long as your server returns the data is the expected format (or as long as you reformat the data accordingly on the front-end) -- the grid will automatically figure out the rest.

options.formatter is used to format the cells in your grid. It's a translation layer between "what your data is" and "how your data is presented". For example, you may want to display booleans as a checkmark icon, or you may want your numbers formatted in a particular way. The grouping will always be done on the data in your data set.

@EvHaus EvHaus closed this as completed Mar 2, 2014
@EvHaus EvHaus added the invalid label Mar 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants