Avatar of Thread7
Thread7 asked on

How to hide a column in a Flash Datagrid?

I have a datagrid with 4 columns like name, address, etc. One column is a 5 digit employee ID that I don't want people to see. But I want to be able to retrieve this ID in my actionscript if I need it.
I thought I might just be able to set a column width of 0. But that doesn't work. It forces the column to be a few pixels wide at least.

Here is some various code I've tried with no luck.
theDataGrid.columns[4].width = 0;
theDataGrid.getColumnAt(4).visible = false;
theDataGrid.getColumnAt(4)._visible = false;
theDataGrid.columns[4].headerText = "";

Instead of hiding maybe can I attach it to the array without showing it?  I don't see a way.
I must note that I am using a third party "Drag and Drop DataGrid Component" from Drumbeatinsight.  However their documentation says that this component extends the Macromedia datagrid component so all those functions should be accessible to me.
Adobe Flash.
Adobe FlashWeb ApplicationsWeb Graphics Software

Avatar of undefined
Last Comment

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

here's what i'd do.
create the array without the ids, use that as the dataprovider for you datagrid. then create a separate array (at the same time) with the employee IDs - then when you get the selectedIndex of that datagrid and you want the employee id you should be able to parse that index to your employeeID array and pull the data that way.


It was just that easy.  I can still access that value if I drag a cell to another datagrid.
Your help has saved me hundreds of hours of internet surfing.