not exact grouping / grouping by intervals of values #452

Merged
merged 1 commit into from Apr 29, 2013

Conversation

Projects
None yet
2 participants
@OlegKi
Contributor

OlegKi commented Apr 24, 2013

Hello,

after writing the answer I examined more exact the possibilities extending of jqGrid grouping so that not only exact values can be used to build groups. I think that I found very simple and flexible enough way which

  1. support of "not exact" grouping by introducing isInTheSameGroup array of callbacks in groupingView.
  2. more flexibility in constructing of displayField by introducing of formatDisplayField array of callbacks in groupingView.

The results of the suggested modifications one can see on the demo which displays the results like the following

One can see that the grouping on the first level will be done in case-insensitive way and that the values will be displayed in low case in the grouping header.

One can see that the grouping on the second level will be done by intervals of values (by year and month). The grouping header display also no day of the grouping element.

I tried to make the changes to make full compatibility with existing grids.

I hope that such changes will be helpfully for other users of jqGrid.

Best regards
Oleg

Update grid.grouping.js
 1. support of "not exact" grouping by introducing `isInTheSameGroup` array of callbacks in `groupingView`.
 2. more flexibility in constructing of `displayField` by introducing of `formatDisplayField` array of callbacks in `groupingView`.
@tonytomov

This comment has been minimized.

Show comment Hide comment
@tonytomov

tonytomov Apr 29, 2013

Owner

Oleg,

Thanks. That is good (I will merge it), but I think we going to introduce to many options which at some time will make the grid not usable.

Owner

tonytomov commented Apr 29, 2013

Oleg,

Thanks. That is good (I will merge it), but I think we going to introduce to many options which at some time will make the grid not usable.

@tonytomov tonytomov closed this Apr 29, 2013

@tonytomov tonytomov reopened this Apr 29, 2013

tonytomov added a commit that referenced this pull request Apr 29, 2013

Merge pull request #452 from OlegKi/master
not exact grouping / grouping by intervals of values

@tonytomov tonytomov merged commit 887e2ae into tonytomov:master Apr 29, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment