Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

icons stuck in datagrid

Status
Not open for further replies.

wrestle145

Programmer
May 17, 2005
3
US
I have a datagrid that uses a cell renderer to put an icon into the first column. the data is loaded dynamiclly. If I load 10 rows I get 10 icons in the right coloumn which is what I want. But if I then load only 5 columns I still have 10 icons in the icon column instead of five. I do a removeAll() on the datagrid but the icons still stick for some reason. any help would be appreciated.
 
Try this.

Code:
import mx.controls.gridclasses.DataGridColumn;
myGrid.removeColumnAt(0); // where 0 is the index of the column you want to remove.

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
I tried that previously. It works but really slows down the applicatation. Thanks though for the suggestion. I found that when you use the cell renderer to add icons you have to unload any movie clips if the value passed to the cell renderer is undefined. this will remove any unwanted icons.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top