flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kessler CTR Mark J" <mark.kessler....@usmc.mil>
Subject RE: Dynamic DataGrid
Date Mon, 14 Jan 2013 12:15:45 GMT
Well a regular s:DataGrid you could loop through the rows checking each column you have then
change the visibility of a column without any data.

Number of rows: yourDataGrid.dataProviderLength
List of columns: yourDataGrid.columns
Number of columns: yourDataGrid.columnsLength

Hide/Show column:  yourDataGrid.columns.getItemAt(index).visible = true/false


If your data is coming from a server/database you may just send a few values back showing
which columns are empty since you might be looping to read records anyways.

Not sure how the same idea would work with the AdvancedDataGrid, but it does have a columns
and dataProvider properties.  Just have to get the lengths from those properties directly.





-Mark

-----Original Message-----
From: Oleg Konovalov [mailto:olegkon@gmail.com] 
Sent: Saturday, January 12, 2013 15:45
To: dev@flex.apache.org
Subject: Dynamic DataGrid

Hi,

I am trying to create dynamic DataGrid,
which shows columns only if it contains data
return by query (it has 10+ columns, so not easy to calculate sizes)..
I read a lot of posts on the net, tried  minWidth, ResizeMode, etc.

Nothing really useful which works.
In most cases  it created very narrow columns except the last one - super
wide.

Please help!

(using Flex4 AdvancedDataGrid)

-- 
Thank you in advance,
Oleg.
Mime
View raw message