jQuery UI Widgets Forums Grid Grid width and height

Tagged: 

This topic contains 17 replies, has 7 voices, and was last updated by  Peter Stoev 10 years, 10 months ago.

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
  • Grid width and height #3103

    AndyXie
    Member

    I want to set the grid width and height to 100%, how can I implement it?

    Grid width and height #3106

    Peter Stoev
    Keymaster

    Hi AndyXie,

    The Grid works with fixed size like width: ‘500px’, height: ‘600px’. It does not support 100% width or height settings. However, it supports auto-height. When the ‘autoheight’ property is set to true, the Grid is automatically resized to the sum of all rows heights.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Grid width and height #3110

    AndyXie
    Member

    Actually I want to this feature(support 100% width or height). Sometimes when user maximize the window or resize its parent container, it’s better the grid should adapt the new width and height. Do you have plan to support this feature in the future?

    Grid width and height #3111

    Peter Stoev
    Keymaster

    Hi AndyXie,

    We will consider implementing this feature in a future version, but I am unable to provide you a specific time-frame. As soon as we decide to implement it, we will publish it in our Roadmap.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Grid width and height #3112

    Peter Stoev
    Keymaster

    Hi AndyXie,

    I will do my best to update this thread when the feature is available or I have a solution for you.

    Best Wishes,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Grid width and height #3113

    AndyXie
    Member

    Thanks, Peter. I’m looking forward for the next release.

    Grid width and height #3198

    jonr
    Member

    I agree with AndyXie, this would be a great feature because if I have a lot of columns in my grid in a master-detail view and the details are on the right, the grid will have some of the columns hidden. If I set the width to be 50% of the page, the user could maximize the page to see more of the columns that were previously hidden due to the details view.

    Jon

    Grid width and height #3203

    Peter Stoev
    Keymaster

    Hi Jon,

    We know that this feature is very important and it is in our future development plans. As soon as we plan its implementation, we will update our Roadmap and this thread, too.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Grid width and height #4857

    mattkay
    Participant

    one other thing to consider is that if the grid is on a page with a splitter we would want to be able to automatically control the width of the grid as the user slides the splitter.
    Matt

    Grid width and height #4860

    Peter Stoev
    Keymaster

    Hi Matt,

    jqxGrid already supports setting ‘width’ and ‘height’ in %.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Grid width and height #4862

    mattkay
    Participant

    Hi Peter:

    The problem that we are having is that we cannot get the grid columns to re-size when we move the splitter.

    we want to be able to set the column widths as a percentage of the total grid width. we also need to be able to lock certain columns

    so lets say we have 3 columns in a 900px width grid.

    we want to be able move the slider for example and increase the grid to 1000px. when we do this we would want to be able to for example lock the first column at 100px so that it doesnt grow or shrink. the second and third column for example we would want to increase proportionally. so in this case, after we move the splitter, the first column would still be 100px and the second and third columns would both be 450px.

    we dont see any ability to do this. can you please advise as to some solution.

    Matt

    Grid width and height #4863

    Peter Stoev
    Keymaster

    Hi Matt,

    It is possible to set the size of the Grid widget in percentages, but setting the Grid Columns width in percentages is not supported. We’ll consider implementing the requested feature in the future.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Grid width and height #32437

    zshah
    Member

    Hi Peter
    I have started using jqwidgets and started with implementing grids. I am using that as a portlet in Liferay.

    I have configured jqxgrid to be

    $(“#jqxgrid”).jqxGrid(
    {
    width: “100%”,
    source: dataAdapter,
    pageable: “true”,
    autoheight: “true”,
    columnsresize: “true”,
    virtualmode: “true”,
    rendergridrows: function (params) {
    return params.data;
    },
    columns: ${colFlds}
    });

    Now in liferay I can move this portlet to different column layout. i.e. I can move to 70% of the page or 30% of the page. Ideally it should resize the grid as per top div’s width however that is not happening and since overflow is hidden half of the grid is not seen at all.

    I did view source and noticed that many places width is used as fixed pixels like 840px, etc. However I have set my columns width as percentage.

    Could you please provide me with info where can i get rid of these fix widths?

    Grid width and height #32438

    Peter Stoev
    Keymaster

    Hi zshah,

    If your columns width is in percentages, then the calculations of their widths would be in percentages, too. However, the Grid would convert the percentages to pixels when it displays the columns. If the Grid is resized, the columns width would be recalculated and so on. That means that if there’s some problem, it is not with the fixed widths. Ex: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/autosize.htm

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Grid width and height #51327

    cirrus
    Participant

    Hi guys,

    I am trying to fit the table in a page which shows some information inside a desktop app. I need to set the width and height to 80% of the page and keep this proportion all the time. Using the following code I managed to do this with width but height is just not working. If I set the autoheight to true then the table goes beyond the page size and I have to scroll to the end of the page to see the horizontal scroll bar in the table. Basically I want to see the horizontal and vertical scroll bars in the table all the time. Any help would be most appreciated. -Thanks

    $(“#jqxgrid”).jqxGrid(
    {
    width: “100%”, <!–pass in as variable–>
    height: “80%”,
    source: dataAdapter,
    sortable: true,
    //autoheight: false,
    autoloadstate: true,
    autosavestate: true,
    columnsresize: true,
    columnsreorder: true,
    showfilterrow: true,
    filterable: true,
    altrows: true,
    //groupsrenderer: groupsrenderer,
    groupsexpandedbydefault: true,
    groupable: true,
    showgroupsheader: false,

Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic.