Hi Harish, I have done that but am still facing some problme in dataGrid.. I have posted my issues regarding dataGrid today and day before yesterday.... will appreciate if you go through all of them and let me know the solutions.....
Thanks for your support... Sanjay Sharma --- In flexcoders@yahoogroups.com, "Harish Sivaramakrishnan" <[EMAIL PROTECTED]> wrote: > > do not use the column names, just store the indices of the columns and do > datagridInstance.columns[columnIndex].visible= true / false. > > this is the right way of doing it. > > On 05 Mar 2007 22:20:28 -0800, sanjaypmg <[EMAIL PROTECTED]> wrote: > > > > 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 > > > > > > >