Jsgrid: How to align rows in grid?

Created on 23 Aug 2016  路  6Comments  路  Source: tabalinas/jsgrid

@tribis Hey there. I have a serious issue in aligning my rows. Whenever grid is load it squeezes the row and if I slightly change the size of browser then it surprisingly become correctly aligned I dont whats the issue behind this. Waiting for your help please as early as possible. I have attached screen shot and the piece of code which will clear you my issue.

CODE:

$("#userUpdation").jsGrid({
        height: "100%",
        width: "100%",
        filtering: false,
        inserting:false,
        editing: true,
        selecting: true,
        sorting: false,
        paging: true,
        autoload: true,
        pageSize: 10,
        pageButtonCount: 5,
        controller: {

            loadData: function (filter) {
                return $.ajax({
                    type: "GET",
                    url: "/updateUser",
                    data: filter,
                    success: function (result){
                              **$('#userUpdation').jsgrid('render');**
                    }
                });
            }
        }
    });

jsgrid

help wanted

Most helpful comment

Glad that you figured it out. You are welcome!

All 6 comments

Most probably you grid is rendered in an invisible container (e.g. in a hidden tab of a tab control).
Once you show this container call refresh method of the grid.
See possibly related issue https://github.com/tabalinas/jsgrid/issues/216

Thanks it works on a sample project but still there's some issue in my actual code. If I add a navbar in my project then refresh fails.

Could you provide an example to see the issue?

Yeah sure.

@tabalinas Thanks man it is working now. I had an invisible container and I was unaware of it now all things are clear. Thanks for your help.

Glad that you figured it out. You are welcome!

Was this page helpful?
0 / 5 - 0 ratings