Skip to content
This repository has been archived by the owner on Jan 1, 2020. It is now read-only.

Investigate use of colgroup #59

Open
flack opened this issue Jan 14, 2015 · 7 comments
Open

Investigate use of colgroup #59

flack opened this issue Jan 14, 2015 · 7 comments
Milestone

Comments

@flack
Copy link
Contributor

flack commented Jan 14, 2015

Currently, if you set e.g. hidden: true in colModel, style="display: none" is added to each cell in the column. Performance might be better if we define a colgroup instead, because then the runtime for setting these properties would be O(1) instead of O(n). Markup would then look like this:

<table id="grid">
    <colgroup>
        <col style="display: none">
        <col style="text-align: right">
    </colgroup>
    <tr>
        <td>This is the hidden column</td>
        <td>This is the right-aligned column</td>
    </tr>
</table>
@flack flack added this to the 2.0 milestone Jan 14, 2015
@OlegKi
Copy link
Contributor

OlegKi commented Jan 15, 2015

I agree with that the usage of colgroup can be helpful in general. I consider the feature some years before. Do you tested the code? Look at the demo.

The problem is that works not exactly how one want. One can apply only some small subset of specific CSS properties on visible columns. So the real help of colgroup is not so large.

@meh-uk
Copy link
Contributor

meh-uk commented Jan 15, 2015

It looks like you can style columns visibility - http://www.search-this.com/2007/04/11/styling-table-columns-with-css/

@flack
Copy link
Contributor Author

flack commented Jan 15, 2015

Yes, I just tried that with Oleg's jsfiddle: If you replace display: none with visibility: collapse, it works as expected

@smartcorestudio
Copy link
Contributor

Have you tried "visibility: collapse" on Blink-based browsers?

@smartcorestudio
Copy link
Contributor

I've tested Oleg's fiddle with "visibility: collapse" on the latest Chrome and had no luck. Everything is OK on FF and IE.

@flack
Copy link
Contributor Author

flack commented Jan 15, 2015

Hm, I guess you're right: Chrome (I tried 37) doesn't support that correctly

@flack
Copy link
Contributor Author

flack commented Jan 19, 2015

Another option for improving rendering performance might be React:

http://facebook.github.io/react/

Unfortunately, their core lib is 130Kb, almost as big as the entire jqgrid. But maybe we can borrow a few ideas from them

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants