PDA

View Full Version : Ext JS 4 Grid Panel Renders with unwanted every other row blank after store load.



drgaryholland
25 Jan 2013, 4:45 AM
I have a grid that renders blank rows after every row with data. Every other row is blank. I have checked and double checked the model, store proxy xml reader, reader root and record all look ok The xml data shown below tells me The rows are loading ok but rendering an extra blank row in the grid after every valid row rendered.
Has anyone else encountered such a problem ...if so the remedy. I have spent almost 2 days on this and I am out of ideas where to look. Thanks in advance.

41525


configured to a store that when loaded the data looks like this :


<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <custOrderDlvs>
<custOrderDlv>
<actualDeliveryDate>2013-01-01T00:00:00-08:00</actualDeliveryDate>
<comments>DLV LINE 1</comments>
<createdBy>admin</createdBy>
<createdOn>2013-01-22T18:07:55-08:00</createdOn>
<custOrderDlv>1</custOrderDlv>
<custOrderNoLineNo>ORDER-0011</custOrderNoLineNo>
<deliveryDueDate>2013-01-01T00:00:00-08:00</deliveryDueDate>
<modifiedBy>admin</modifiedBy>
<modifiedOn>2013-01-09T07:01:04-08:00</modifiedOn>
<orderNoLineNoDlvNo>ORDER-00111</orderNoLineNoDlvNo>
<qtyDelivered>1.0</qtyDelivered>
<qtyToDeliver>5.0</qtyToDeliver>
</custOrderDlv>
<custOrderDlv>
<actualDeliveryDate>2013-01-01T00:00:00-08:00</actualDeliveryDate>
<comments>comments go here</comments>
<createdBy>admin</createdBy>
<createdOn>2013-01-22T18:07:55-08:00</createdOn>
<custOrderDlv>2</custOrderDlv>
<custOrderNoLineNo>ORDER-0011</custOrderNoLineNo>
<deliveryDueDate>2013-01-01T00:00:00-08:00</deliveryDueDate>
<modifiedBy>admin</modifiedBy>
<modifiedOn>2013-01-09T07:01:04-08:00</modifiedOn>
<orderNoLineNoDlvNo>ORDER-00112</orderNoLineNoDlvNo>
<qtyDelivered>1.0</qtyDelivered>
<qtyToDeliver>5.0</qtyToDeliver>
</custOrderDlv>
<custOrderDlv>
<actualDeliveryDate>2013-01-01T00:00:00-08:00</actualDeliveryDate>
<comments>Dlv line 2</comments>
<createdBy>admin</createdBy>
<createdOn>2013-01-22T18:07:55-08:00</createdOn>
<custOrderDlv>1</custOrderDlv>
<custOrderNoLineNo>ORDER-0012</custOrderNoLineNo>
<deliveryDueDate>2013-01-01T00:00:00-08:00</deliveryDueDate>
<modifiedBy>admin</modifiedBy>
<modifiedOn>2013-01-09T07:01:04-08:00</modifiedOn>
<orderNoLineNoDlvNo>ORDER-00121</orderNoLineNoDlvNo>
<qtyDelivered>1.0</qtyDelivered>
<qtyToDeliver>10.0</qtyToDeliver>
</custOrderDlv>
<custOrderDlv>
<actualDeliveryDate>2013-01-01T00:00:00-08:00</actualDeliveryDate>
<comments>comments</comments>
<createdBy>admin</createdBy>
<createdOn>2013-01-22T18:07:55-08:00</createdOn>
<custOrderDlv>2</custOrderDlv>
<custOrderNoLineNo>ORDER-0012</custOrderNoLineNo>
<deliveryDueDate>2013-01-01T00:00:00-08:00</deliveryDueDate>
<modifiedBy>admin</modifiedBy>
<modifiedOn>2013-01-09T07:01:04-08:00</modifiedOn>
<orderNoLineNoDlvNo>ORDER-00122</orderNoLineNoDlvNo>
<qtyDelivered>1.0</qtyDelivered>
<qtyToDeliver>5.0</qtyToDeliver>
</custOrderDlv>
</custOrderDlvs>

.....and My Panel grid:


xtype: 'gridpanel', height: 297,
id: 'custOrderDlvGridPanel',
title: 'Customer Order Delivery Schedule Lines',
store: 'CustOrderDlvStore',
viewConfig: {


},
plugins: [
Ext.create('Ext.grid.plugin.RowEditing', {
ptype: 'rowediting',
clicksToEdit: 1
})
],
columns: [
{
xtype: 'gridcolumn',
dataIndex: 'custOrderDlv',
text: 'CustOrderDlv',
editor: {
xtype: 'numberfield',
decimalPrecision: 0
}
},
{
xtype: 'gridcolumn',
dataIndex: 'comments',
text: 'Comments',
editor: {
xtype: 'textareafield'
}
},
{
xtype: 'gridcolumn',
hidden: true,
dataIndex: 'custOrderNoLineNo',
text: 'CustOrderNoLineNo'
},
{
xtype: 'datecolumn',
dataIndex: 'deliveryDueDate',
text: 'DeliveryDueDate',
format: 'm/d/Y',
editor: {
xtype: 'datefield'
}
},
{
xtype: 'gridcolumn',
hidden: true,
dataIndex: 'orderNoLineNoDlvNo',
text: 'OrderNoLineNoDlvNo'
},
{
xtype: 'numbercolumn',
dataIndex: 'qtyToDeliver',
text: 'QtyToDeliver',
editor: {
xtype: 'numberfield'
}
},
{
xtype: 'numbercolumn',
dataIndex: 'qtyDelivered',
text: 'QtyDelivered'
},
{
xtype: 'datecolumn',
dataIndex: 'actualDeliveryDate',
text: 'ActualDeliveryDate',
format: 'm/d/Y'
},
{
xtype: 'gridcolumn',
hidden: true,
dataIndex: 'createdBy',
text: 'CreatedBy'
},
{
xtype: 'datecolumn',
dataIndex: 'createdOn',
text: 'CreatedOn'
},
{
xtype: 'gridcolumn',
dataIndex: 'modifiedBy',
text: 'ModifiedBy'
},
{
xtype: 'datecolumn',
dataIndex: 'modifiedOn',
text: 'ModifiedOn'
}
]
}
]
}

...my model


Ext.define('ShopTrack.model.CustOrderDlv', { extend: 'Ext.data.Model',


idProperty: 'orderNoLineNoDlvNo',


fields: [
{
name: 'actualDeliveryDate',
dateFormat: 'c',
type: 'date'
},
{
name: 'comments',
type: 'string'
},
{
name: 'custOrderDlv',
type: 'string'
},
{
name: 'custOrderNoLineNo',
type: 'string'
},
{
name: 'deliveryDueDate',
dateFormat: 'c',
type: 'date'
},
{
name: 'orderNoLineNoDlvNo',
type: 'string'
},
{
name: 'qtyDelivered',
type: 'float'
},
{
name: 'qtyToDeliver',
type: 'float'
},
{
name: 'createdBy',
type: 'string'
},
{
name: 'createdOn',
dateFormat: 'c',
type: 'date'
},
{
name: 'modifiedBy',
type: 'string'
},
{
name: 'modifiedOn',
dateFormat: 'c',
type: 'date'
}
],


proxy: {
type: 'rest',
url: '/shopTrack/webresources/shoptrack.custorderdlv',
appendId: false,
reader: {
type: 'xml',
implicitIncludes: false,
record: 'custOrderDlv'
}
}
});

...and finally my store:


Ext.define('ShopTrack.store.CustOrderDlvStore', { extend: 'Ext.data.Store',


requires: [
'ShopTrack.model.CustOrderDlv'
],


constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
autoSync: true,
storeId: 'cuOrderDlvStore',
model: 'ShopTrack.model.CustOrderDlv'
}, cfg)]);
}
});

mitchellsimoens
28 Jan 2013, 12:06 PM
The grid will show what's in the store, have you inspected the store to see if it has these blank records?

drgaryholland
28 Jan 2013, 7:30 PM
The loaded store (which I have listed above ) does not contain any blank rows.
I had purchased architect 2 and that is what I am using to view the store contents by clicking on the Icon after a manual store load. Everything appears fine in the store. Also when I use the browser to make a get to the restful service all the data appears normal and as it should be, just like the store.

So I created a new panel and new store using the same model .....same thing.