Hi All,
I am facing an Error while making Grid columns visible\Invisible at
runtime.
I have made a function showHideColumns in my application which accepts
2 arrays as parameters. One is "colNameArr" Which has all the column
names of GRID and another one is "colStatusArr", which has TRUE or
FALSE corresponding to that partifular column.
When I call the method "showHideColumns" It is making the column
visible\invisible but showing an ERROR also Which is "Cannot Create a
Property on String".
How Can I remove that error? pls suggest me something. the function is
given below:
****************** FUNCTION *************************************
public function showHideColumns(colNameArr:Array,
colStatusArr:Array):void{
for(var i:int=0; i<colStatusArr.length; i++){
this[colNameArr[i]].visible = colStatusArr[i];
}
}
*******************************************************
Thanks in Advance,
Sanjay Sharma