jQWidgets Forums

jQuery UI Widgets Forums Grid autorowheight in jqGrid

This topic contains 4 replies, has 2 voices, and was last updated by  sathiyaseelan8 12 years ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • autorowheight in jqGrid #21012

    sathiyaseelan8
    Participant

    why autorowheight property is not working in jqGrid? can anyone assist me on this? thanks in advance.

    autorowheight in jqGrid #21016

    Peter Stoev
    Keymaster

    Hi,

    Here’s a working sample with “autorowheight” set to true: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/autorowheight.htm?web. I hope that it will help you.

    Best Regards,
    Peter Stoev

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

    autorowheight in jqGrid #21419

    sathiyaseelan8
    Participant

    dear Peter,

    i already tried that but its still not working.

    autorowheight in jqGrid #21425

    Peter Stoev
    Keymaster

    Hi,

    Please, take a look at the posted sample and use its code as getting started for using the Grid with “autorowheight” turned on. Also make sure that you use jQWidgets 2.8.3. If you still do not see the desired effect then post a small sample that we will be able to run locally and test your scenario.

    Best regards,
    Peter Stoev

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

    autorowheight in jqGrid #22115

    sathiyaseelan8
    Participant

    hi peter,

    i am using the latest jQwidgets 2.8.3, yet the autorowheight is still not working. here is my sample code.

    $(document).ready(function () {
    var theme = ‘ui-redmond’;

    var key = $(‘#key’).attr(‘value’);

    var initView = function () {
    $.getJSON(“include/display_issue.php?id=”+key, function(data) {
    $(‘#jqxView’).html(data);
    });
    }

    var initGrid = function () {
    var source =
    {
    datatype: “json”,
    datafields: [
    { name: ‘engineer’, type: ‘string’ },
    { name: ‘action’, type: ‘string’ },
    { name: ‘mode’, type: ‘string’ },
    { name: ‘date’, type: ‘date’ },
    ],
    root: “data”,
    url: ‘include/view_chrono.php?id=’+key,
    sortcolumn: ‘date’,
    sortdirection: ‘asc’
    };
    var dataAdapter = new $.jqx.dataAdapter(source, { async: false, loadError: function (xhr, status, error) { alert(‘Error loading “‘ + source.url + ‘” : ‘ + error); } });
    $(“#jqxGrid”).jqxGrid(
    {
    width: ‘100%’,
    height: ‘100%’,
    source: dataAdapter,
    theme: theme,
    autorowheight: true,
    autoheight: true,
    sortable: true,
    filterable: true,
    altrows: true,
    columns: [
    { text: ‘Engineer’, datafield: ‘engineer’, width: 90 },
    { text: ‘Action’, datafield: ‘action’},
    { text: ‘Mode’, datafield: ‘mode’, width: 150 },
    { text: ‘Date’, datafield: ‘date’, cellsformat: ‘dd-MM-yyyy’, width: 110 },
    ]
    });
    }

    // init widgets.
    var initWidgets = function (tab) {
    switch (tab) {
    case 0:
    initView();
    break;
    case 1:
    initGrid();
    break;
    }
    }
    $(‘#jqxTabs’).jqxTabs({ width: 900, height: ‘auto’, theme: theme, initTabContent: initWidgets });
    });

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.