Hi Sathish, You need to build your new columns array
locally in the function and then assign this array to dataGrid.columns. This is
because the columns property returns a copy of the DataGrid’s columns
array. Eg:
var newColumns : Array = new Array();
// Add all your new columns to the newColumns array
myGrid.columns = newColumns; Paul From: Sample Code:
var len:int =
xml_itemCount.children()[0].children().length(); _____________________________________________
I
have a datagrid and the data loaded into it is dynamic. The number of columns
are also different each time. So I am trying to read the xml data that is used
for the datagrid and create columns at run time using 'columns' property of the
datagrid. But for some reason it's not creating those columns in datagrid. Am I
missing anything? Any
sample code for this kinda thing? Thanks
-- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
Title: RE: Adding columns dynamically in a datagrid