Giter Site home page Giter Site logo

Comments (10)

reaperhulk avatar reaperhulk commented on August 26, 2024

To replicate all you should need to do is make a grid with several columns, then hide the first row. However, if needed I can supply a page that demonstrates the issue. I just tested against the latest source from github and that didn't resolve the issue.

from jqgrid.

tonytomov avatar tonytomov commented on August 26, 2024

Hello,
This is true. Also we need to make more deeper solution. When the standard methods are used there is no problem - like addRowData and delRowData. This bug need to be fixed with care.
Thanks again.
Best Regards
Tony

from jqgrid.

reaperhulk avatar reaperhulk commented on August 26, 2024

Thanks for the quick response. I will try to use addRowData/delRowData for the moment instead of show/hide as a workaround.

from jqgrid.

pennig avatar pennig commented on August 26, 2024

Maybe a suitable fix to this issue would be to make use of the colgroup/col elements inside the data table rather than setting widths on the first row of data.

from jqgrid.

tonytomov avatar tonytomov commented on August 26, 2024

Hello,
Thanks for the suggestion. This work well in all browsers except .. as you can imagine in IE.
Best regards
Tony

from jqgrid.

pennig avatar pennig commented on August 26, 2024

What limitations are you facing? I just did a simple test updating col elements' widths and things seem to work. See: http://chipt.com/tests/colgroup.html

from jqgrid.

tonytomov avatar tonytomov commented on August 26, 2024

Hello,
Thanks.
In simple table this works. Try to implement UI theming
Regards
Tony

from jqgrid.

calca avatar calca commented on August 26, 2024

it's yeas to fix:

on line http://github.com/tonytomov/jqGrid/blob/master/js/grid.base.js#L1690
it's necessary to change how row is selected.

instead of var r = this.rows[0] is necessary to use $("> tbody > tr:visible:first", this);
where 'this' is table div.

I wrote custom function to do this.

$.jgrid.extend({
    updateColumnsNotHide: function() {
var grid = this[0].grid;
var r = $("> tbody > tr:visible:first", this);
if (r) {
    $("td", r).each(function(k) {
        $(this).css("width", grid.headers[k].width + "px");
    });
}
return this; }});

from jqgrid.

calca avatar calca commented on August 26, 2024

when you hide one row, you need update alt-class ;)

$.jgrid.extend({
    updateAltRowStyle: function() {
var $t = this[0].p;
if ($t.altRows === true) {
    var cn = $t.altclass;
    $("> tbody > tr", this).removeClass(cn);
    $("> tbody > tr:visible:odd", this).addClass(cn);
}} });

that's all ;)

from jqgrid.

tonytomov avatar tonytomov commented on August 26, 2024

It is fixed now

from jqgrid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.