[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

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

[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'

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
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: this is

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 flexcoders%40yahoogroups.com, Clint Tredway [EMAIL PROTECTED]

[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);

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

2007-02-11 Thread Adam Royle
[0]); to fit exactly what you want. It might work as is though. Cheers, Adam - Original Message - From: munene_uk To: flexcoders@yahoogroups.com Sent: Monday, February 12, 2007 8:41 AM Subject: [flexcoders] Re: Datagrid update woes(blank rows) ive done as suggested

[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(); }