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
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
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'
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
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
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]
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);
[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
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();
}
9 matches
Mail list logo