PDA

View Full Version : hiding dataset column in datagrid


sneakyimp
04-11-2006, 08:03 PM
thanks to the amazing http://amfphp.org i have got the data from my database into my flash movie as an array of objects.

i have further lucked out by getting my data into a dataset thusly:

productDataSet.items = myArray();

what i cannot seem to do is bind productDataGrid to productDataSet such that
a) productDataSet has nice user-friendly names like "Style Name" instead of styleName
b) the "id" column is hidden. users should NOT see that stuff.

Can this be done? I've been posting the macromedia site and they are LAME LAME LAME over there.

Generally speaking the documentation on DataSets and DataGrids and how they connect and bind to each other is NONEXISTENT. Sure, you can assign a schema but WHAT THE HECK DOES IT MEAN TO ASSIGN A SCHEMA? I have yet to see any documentation or tutorials that describe this enough to even use these components at all, much less provide any detail for experience developers like us.:mad:

tg
04-11-2006, 08:41 PM
something like (this is straight out of the help panel

my_dg.removeColumnAt(my_dg.getColumnIndex("name"));



just put in whatever the name of the column is you want to remove.... in this case the name of the column is 'name' or you could just hardcode in an index like 0.

oldnewbie
04-11-2006, 08:49 PM
Wow! You out of general chat TG? Must be a slow day! :rolleyes:

sneakyimp
04-11-2006, 09:51 PM
you are *so* the man. i had started working with columnames...that might just do it. thanks!