pep
05-17-2004, 09:16 PM
working with a code like this one to fill a grid, I have can't empty the grid:
<grid>
<method event="oninit">
var tmpgroup = new LzDataset(null,{name: 'tempgroup'});
var tmp=tmpgroup.getPointer();
tmp.addNode('toto',{id: 'My groups'});
Debug.write(tmpgroup.serialize());
this.setDatapath('tempgroup:/');
</method>
<gridcolumn> ...
I tried to create a new dataset named temgroup like this:
<method name="clear">
var tmpgroup = new LzDataset(null,{name: 'tempgroup'});
var tmp=tmpgroup.getPointer();
tmp.addNode('toto',{id: 'My groups'});
Debug.write(tmpgroup.serialize());
this.setDatapath('tempgroup:/');
</method>
(it is the same code than above but it does not work)
I also tried to empty the dataset child by child with deleteNode
this.ptr=this.datapath.dupePointer();
if(ptr.selectChild()){
while(ptr!=null){ptr.deleteNode()
}
do not work also, does any one knows how this schould be done?
<grid>
<method event="oninit">
var tmpgroup = new LzDataset(null,{name: 'tempgroup'});
var tmp=tmpgroup.getPointer();
tmp.addNode('toto',{id: 'My groups'});
Debug.write(tmpgroup.serialize());
this.setDatapath('tempgroup:/');
</method>
<gridcolumn> ...
I tried to create a new dataset named temgroup like this:
<method name="clear">
var tmpgroup = new LzDataset(null,{name: 'tempgroup'});
var tmp=tmpgroup.getPointer();
tmp.addNode('toto',{id: 'My groups'});
Debug.write(tmpgroup.serialize());
this.setDatapath('tempgroup:/');
</method>
(it is the same code than above but it does not work)
I also tried to empty the dataset child by child with deleteNode
this.ptr=this.datapath.dupePointer();
if(ptr.selectChild()){
while(ptr!=null){ptr.deleteNode()
}
do not work also, does any one knows how this schould be done?