franklt69
22 Feb 2007, 8:20 AM
Hi I have a grid it load data from a xml.
The xml is generated in the server based in a search, when there is data the grid show its, if I add a row it work ok
gridAddress.getDataModel().addRow(1,['a1','a1','a2','c','country','county','pc','fl','5555','home','10:181']);
the new row appear in the grid, but when I do a search and the xml don't have data the grid appear empty again is ok, then when I do it:
gridAddress.getDataModel().addRow(1,['a1','a1','a2','c','country','county','pc','fl','5555','home','10:181']);
I get this error:
this.data[0] has no properties
in yui-ext-debug.js
createNode: function(xmlDoc, id, colData){
var template = this.data[0].node;
var newNode = template.cloneNode(true);
var fields = this.schema.fields;
for(var i = 0, len = fields.length; i < len; i++){
the xml response from server is
<?xml version="1.0" encoding="Windows-1252"?><xmlResponse><TotalCount>0</TotalCount></xmlResponse>
so the question how I can add a row when I don't have data in the xml?
if I send the xml with data empty the grid will show it (how a record empty) and I don't want it
is there solution?
kind regards
Frank
The xml is generated in the server based in a search, when there is data the grid show its, if I add a row it work ok
gridAddress.getDataModel().addRow(1,['a1','a1','a2','c','country','county','pc','fl','5555','home','10:181']);
the new row appear in the grid, but when I do a search and the xml don't have data the grid appear empty again is ok, then when I do it:
gridAddress.getDataModel().addRow(1,['a1','a1','a2','c','country','county','pc','fl','5555','home','10:181']);
I get this error:
this.data[0] has no properties
in yui-ext-debug.js
createNode: function(xmlDoc, id, colData){
var template = this.data[0].node;
var newNode = template.cloneNode(true);
var fields = this.schema.fields;
for(var i = 0, len = fields.length; i < len; i++){
the xml response from server is
<?xml version="1.0" encoding="Windows-1252"?><xmlResponse><TotalCount>0</TotalCount></xmlResponse>
so the question how I can add a row when I don't have data in the xml?
if I send the xml with data empty the grid will show it (how a record empty) and I don't want it
is there solution?
kind regards
Frank