I have a very simple hello world like example for a datagrid:
<table id="dg2"></table>
<script type="text/javascript">
$('#dg2').ready(function () {
$('#dg2').datagrid({
fit: true,
fitColumns: true,
singleSelect: true,
columns: [[
{ field: 'AccountID', hidden: true },
{ field: 'code', title:'Code', width:100, fixed:true },
{ field: 'name', title: 'Name', width: 100, fixed: true },
{ field: 'price', title: 'Price', width: 100, align: 'right', fixed: true },
{ field: 'padding', width: 100, fixed: false }
]],
data: [
{ code: 'value11', name: 'value12', price: 'value13' },
{ code: 'value21', name: 'value22', price: 'value23' },
]
});
});
</script>
I have some nested layouts and inside a center there is a panel.
The datagrid get's loaded in the panel by ajax by a user event.
I get a very strage gap between the first row and the headers.