[flexcoders] Re: Datagrid update woes(blank rows)

2007-02-11 Thread munene_uk
great news!!...ive gone back to using remotingConnection and your method worksthank you so much for all your input! public function onSendResult(result :Array) : void { if(!result) return; dg.dataProvider.addItem(result[0]); dg.dataProvider.refresh(); }

Re: [flexcoders] Re: Datagrid update woes(blank rows)

2007-02-11 Thread Adam Royle
]); dataProvider.addItem(row); dataProvider.refresh(); } Now you might have to change this line: var row:Array = ArrayUtil.toArray(evt.result[0]); to fit exactly what you want. It might work as is though. Cheers, Adam - Original Message - From: munene_uk To: flexcoders@yahoogroups.

[flexcoders] Re: Datagrid update woes(blank rows)

2007-02-11 Thread munene_uk
ive done as suggested however i still get a blank row public function sendResultHandler(evt2:ResultEvent):void { var index:int = dg.dataProvider.length; dg.dataProvider.addItemAt(evt2.result,index); trace(ObjectUtil.toString(evt2.re

Re: [flexcoders] Re: Datagrid update woes(blank rows)

2007-02-11 Thread Clint Tredway
myGrid.dataProvider.length On 2/11/07, munene_uk <[EMAIL PROTECTED]> wrote: how do i find out the index of the last item in order to use addItemAt(evt2.result,index); (if that makes sense!!) --- In flexcoders@yahoogroups.com , "Clint Tredway" <[EMAIL PROTECTED]> wrote: > > try what I sugge

[flexcoders] Re: Datagrid update woes(blank rows)

2007-02-11 Thread munene_uk
how do i find out the index of the last item in order to use addItemAt(evt2.result,index); (if that makes sense!!) --- In flexcoders@yahoogroups.com, "Clint Tredway" <[EMAIL PROTECTED]> wrote: > > try what I suggested in your addItem > > On 2/11/07, munene_uk <[EMAIL PROTECTED]> wrote: > > >

Re: [flexcoders] Re: Datagrid update woes(blank rows)

2007-02-11 Thread Clint Tredway
try what I suggested in your addItem On 2/11/07, munene_uk <[EMAIL PROTECTED]> wrote: this is what i got *[SWF] F:\Adobe\Flex Builder 2\Projects\bin\Savo_Course_Manager2-debug.swf- 1,103,465 bytes after decompression warning: unable to bind to property 'SURNAME' on class 'Object' (class is

[flexcoders] Re: Datagrid update woes(blank rows)

2007-02-11 Thread munene_uk
this is what i got [SWF] F:\Adobe\Flex Builder 2\Projects\bin\Savo_Course_Manager2-debug.swf - 1,103,465 bytes after decompression warning: unable to bind to property 'SURNAME' on class 'Object' (class is not an IEventDispatcher) warning: unable to bind to property 'POSTCODE' on class 'Object' (cl

Re: [flexcoders] Re: Datagrid update woes(blank rows)

2007-02-11 Thread Clint Tredway
trace the evt.result using the ObjectUtil.toString() (note: you will need to import mx.utils.ObjectUtil to do this) and lets see what is coming back from the server. most likely the reason you are getting a blank row is that what is coming back does not match what the grid is expecting. On 2/11/0

[flexcoders] Re: Datagrid update woes(blank rows)

2007-02-11 Thread munene_uk
ok here goes. private function resultHandler(evt:ResultEvent):void { dataProvider = new ArrayCollection ( ArrayUtil.toArray(evt.result) ); // same as: evt.result.toString(); } public function sendResultHandler(evt:ResultEvent):void