Title: Re: [flexcoders] Adding rows to a datagrid programmatically
Thanks Ted.
I have created an Array of Objects which I assign to the dataProvider property of my DataGrid. If I have manually added Columns with names and headerTexts, do the Obj properties have to match ColumnNames
Title: Re: [flexcoders] Adding rows to a datagrid programmatically
Ralf,
The DataGrid maps column data to a
dataProvider via the columnName property. You can also employ
cellRenderers and labelFunctions to render MovieClips/components and alternate
text into the Datagrid from
Title: Re: [flexcoders] Adding rows to a datagrid programmatically
Correction:
myDP = new flow.DataProvider()
myDatagrid.dataProvider = myDT
myDP.addItem( { name:Ted, age:33 } )
myDP.addItem( { name:Fred, age:20 } )
myDP.addItem( { name:Jean, age:25 } )
// set the filter
:: pseudo code ::
:: rave rave rave ::
import
mx.controls.gridclasses.DataGridColumn;
var dgc:DataGridColum = new
DataGridColumn("fieldName");
dgc.columnName = "fieldName";
dgc.headerText = "Pretty Field Name";
myDataGrid.addColumn(dgc);
- Original Message -
From: Ralf
Rottmann
Ralf,
If you are trying to add a row to a
DataGrid you use the DataProviderAPI like so:
myDataGrid.addItem( { a:Hello , b:2 } )
cheers,
Ted ;)
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Ralf Rottmann
Sent: Monday, December
5 matches
Mail list logo