jQWidgets Forums
jQuery UI Widgets › Forums › Grid › autorowheight in jqGrid
Tagged: grid, jquery grid, jqxgrid
This topic contains 4 replies, has 2 voices, and was last updated by sathiyaseelan8 12 years ago.
-
Authorautorowheight in jqGrid Posts
-
why autorowheight property is not working in jqGrid? can anyone assist me on this? thanks in advance.
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 StoevjQWidgets Team
http://www.jqwidgets.com/dear Peter,
i already tried that but its still not working.
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 StoevjQWidgets Team
http://www.jqwidgets.com/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 });
}); -
AuthorPosts
You must be logged in to reply to this topic.