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

Column Chooser with Grouped Headers #261

Closed
Luca7993 opened this issue Aug 8, 2016 · 21 comments
Closed

Column Chooser with Grouped Headers #261

Luca7993 opened this issue Aug 8, 2016 · 21 comments
Labels

Comments

@Luca7993
Copy link

Luca7993 commented Aug 8, 2016

Hi
the column chooser with grouped headers is not workin well:

  1. The reordering of columns is not applied
  2. If you hide one of the columns of the group, the group headers are not applied correctly
    Here is a demo

I think it can be a good idea to work with the entire Group header in column chooser instead with single columns:
Solution

@OlegKi
Copy link
Member

OlegKi commented Aug 8, 2016

The URLs, which you posted, contain references to http://localhost:58145/ and there could not be used. Could you post the information in another way?

@Luca7993
Copy link
Author

Luca7993 commented Aug 8, 2016

Sorry, forget to publish the site and to use the correct link...I need some vacation :)

I have edited the first post with working links

Luca

@OlegKi
Copy link
Member

OlegKi commented Aug 8, 2016

Thank you! I have to do my main job. I will look your demos later.

@OlegKi
Copy link
Member

OlegKi commented Aug 10, 2016

Sorry, but the changes, which you suggest, removes another important feature - the possibility of to hide/show columns which are groupped. I will see how to fix the code to have both: column reordering and hiding/showing the columns.

One more remark. The method setGroupHeaders used for column grouping has one important option: useColSpanStyle: true (see here for example). One should always made two tests: one with useColSpanStyle: true and another with useColSpanStyle: false.

@Luca7993
Copy link
Author

Hi Oleg,
but the hide\show of columns which are groupped is not working well.
In my demo (original), if I hide a groupped column, all headers are shifted.
I'm agree with you, that with my solution is not possibile to hide a single column that is groupped, but I think that having both order and show\hide with groupped columns it's quite complicated and in my opinion, if I want to group some columns, it's ok for me to treat them as a unique column (I remark that is just my opinion).

I've also added the possibility to add\remove col span style

thank you!
Luca

@OlegKi
Copy link
Member

OlegKi commented Aug 11, 2016

Thanks for the bug report! I confirm that hiding of groping columns is broken now (already in 4.13.3) the demo uses 4.13.2 and it shows how it should work. I suppose that some change of the code (probably this one) was wrong in 4.13.3. I suppose that colspan value is changed in the wrong way. It was correctly to remove && !$(ths[i + iCol].el).is(":hidden") part, but other changes were wrong. Sorry, but I'm busy now. I'll analyse and fix the problem later.

@OlegKi OlegKi added the bug label Aug 11, 2016
@Luca7993
Copy link
Author

Hi Oleg,
absolutely no problem of course, and thank you for all of your work!
Anyway I prefer to use my custom solution for groupped columns and I will give that to my customer (it could be an idea also to make the "treat groupped columns as unique column" optionable

thank again
Luca

OlegKi added a commit that referenced this issue Aug 11, 2016
The [commit](4867fce) contained incorrect changes in `setGroupHeaders`. I reverted it and included only really required part of changes. I hope that the bug described [here](#261 (comment)) is fixed now.
@OlegKi
Copy link
Member

OlegKi commented Aug 11, 2016

I had to think about the problem and could not do my main job. Thus I reverted the changes, which I described before and made only really required part of changes. I hope that the problem is fixed now. See the demo, which uses the latest code from GitHub. Please test it if you find the time for it...

@OlegKi
Copy link
Member

OlegKi commented Aug 25, 2016

Sorry for the late answer. I committed just now the changes. columnChooser should support now reordering (or hiding) of columns if header grouping are used. New callback options sortUpdate and init can be used additionally in columnChooser. The commented changes are relatively large and probably more tests are required. My current tests work good.

The only restriction of columnChooser now: one can't change the order of groups in the header. I thought to extend the Column Chooser dialog later with the feature to "collapse" items in the group. The dialog contains currently multiselect control only, but one still call jQuery UI dialog. One can add later for example checkbox in the dialog which can be used to fill multiselect with groups only instead of the items of the group (like in your original suggestion). I consider to use this some time later. The current changes are more important in my opinion.

@OlegKi
Copy link
Member

OlegKi commented Sep 1, 2016

Do you tried the new code of free jqGrid from GitHub? I plan to publish next version of free jqGrid soon and it would be good to fix any bugs before.

@Luca7993
Copy link
Author

Luca7993 commented Sep 1, 2016

Hi Oleg,
No sorry i still didn't try it because i'm in vacation now.
I will check it on 11-12 of September

Thank you
Luca

@OlegKi
Copy link
Member

OlegKi commented Sep 1, 2016

OK, no problem. I wish you to have fun in the vacation!

@Luca7993
Copy link
Author

Hi Oleg,
I've tried the new version and I found a problem on it:
jqgrid problem

@tekvsakdan
Copy link

tekvsakdan commented Sep 14, 2016

"If you hide one of the columns of the group, the group headers are not applied correctly"

This is still an issue in version 4.13.4.

Edit: I can see it is fixed in 4.13.5-pre.

@OlegKi
Copy link
Member

OlegKi commented Nov 1, 2016

@Luca7993: I wanted to publish new version of free jqGrid, but I see that the issue is still opened. The demo, which you posted is not more available. You don't posted the demo and the test case somebody else. I suppose that you had some combination of hidden columns inside of grouped headers or between the grouped headers, but I can't reproduce the bug now on my old demos. Could you post the demo, which uses the code from RawGit and which I could uses the debug and to fix the bug?

@Luca7993
Copy link
Author

Luca7993 commented Nov 4, 2016

Hi Oleg,
sorry for late answer:
we have had some changes in our azure service and that was the reason because the demo wasn't available.
I've moved the demo here: jqgrid test

I've edited the demo for using the code from RawGit.
There aren't any hidden columns in the demo

let me know if I can help you

OlegKi added a commit that referenced this issue Nov 4, 2016
OlegKi added a commit that referenced this issue Nov 5, 2016
@OlegKi
Copy link
Member

OlegKi commented Nov 5, 2016

Thanks for the demo! I posted 3 small changes: this one, this one and this one, which seems to fix the bug, which you reported. Please test the last version of columnChooser and close the issue if everything works correctly now.

@OlegKi
Copy link
Member

OlegKi commented Dec 9, 2016

@Luca7993: Is the bug is fixed? Please, close the issue in the case.

@spektumus
Copy link

spektumus commented Dec 13, 2016

Thanks for your great work on the free jqGrid.

edit: deleted wrong link to commit

@Luca7993
Copy link
Author

everything is working for me

thank you!

@OlegKi
Copy link
Member

OlegKi commented Dec 14, 2016

@Luca7993 and @spektumus : You are welcome!

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

4 participants