Groups | Blog | Home
all groups > flash actionscript > april 2004 >

flash actionscript : DataGrid-removeColumnAt() not working as desired


dub_g
4/3/2004 6:40:23 PM
I'm trying to use [b]myDataGrid.removeColumnAt()[/b], but it isn't working the
way I'd like it to -- if I select the same row in dataGrid#1 (which then
populates dataGrid#2), the contents in dataGrid#2 disappear, then reappear.

My first example does not use the removeColumnAt at all, and thus displays the
2 fields of data that are returned from my ColdFusion Component:

[b][L=http://mfrdata.dex3.com/test/testNavigationHTMv100.htm]http://mfrdata.dex3
..com/test/testNavigationHTMv100.htm[/L][/b]

However, my second example uses removeColumnAt, and doesn't work:

[b][L=http://mfrdata.dex3.com/test/testBuggyHTMv100.htm]http://mfrdata.dex3.com/
test/testBuggyHTMv100.htm[/L][/b]

I initially thought that the reason for the bug was because I was invoking the
"remove the first visible column" each time I selected an item in my data grid,
so I set up an if statement to ensure [b]myDataGrid.removeColumnAt(0);[/b] was
only used the first time; however, this didn't work:
***************************
// In the Group DataGrid Responder
var navGroupGridResponder = new Object();
navGroupGridResponder.onResult=function(navGroupGrid_rs){
navGroupGrid.dataProvider = navGroupGrid_rs;
trace (firstTimeGroupGrid);
if(firstTimeGroupGrid = true){
firstTimeGroupGrid = false;
navGroupGrid.removeColumnAt(0);
}
navGroupGrid.getColumnAt(1).headerText = "Groups";
}

// First Run
var firstTimeGroupGrid:Boolean=true;
***************************

Has anyone else run into the same difficulty? Any ideas on how I can get
around this issue? Any assistance would be greatly appreciated!
dub_g
4/5/2004 3:49:04 AM
Any help at all? [b]Is this an MX2004 Component bug, or feature?[/b]

AddThis Social Bookmark Button