As I recall, if your dataProvider is a
clean array of simple objects, the DataGrid will default to displaying all the
columns, with the property names as column headers, and in unpredictable order. Alternatively, you can dynamically create
the DG columns. To do this you will need some kind of “metadata”
to define the column properties. Dynamically created DGs are noticeably slower
to render, but not unbearably so. From: HiI need to implement a datagrid based on user input. User input determines the number of datagrid columns.Can you please tell me how to do this? In all the examples I have seen the grid columns are static though data is rendered through data provider like this:<mxataGrid id="datagrid1" width="100%" height="80%" dataProvider="{dp}" rowHeight="100"> <mx:columns> <mx:Array> <mxataGridColumn headerText="Name" columnName="name" editable="false"/> <mxataGridColumn headerText="City" columnName="city" editable="false" /> <mxataGridColumn headerText="Birthday" cellRenderer="GridCellRenderer" /> <mxataGridColumn headerText="Favorites" columnName="combodata" editable="true" /> <mxataGridColumn headerText="Delete" columnName="candelete" editable="true" /> </mx:Array> </mx:columns> </mxataGrid> here you have mxataGridColumn tags which render the columns. I need to implement a datagrid which has dynamic number of columns. Please help me.
|
- RE: [flexcoders] dynamic number of datagrid columns Tracy Spratt
- RE: [flexcoders] dynamic number of datagrid columns Gordon Smith
- RE: [flexcoders] dynamic number of datagrid columns Matt Chotin