PDA

View Full Version : How to change the visibility of datagrid Horizontal scrollbar?


Pratap
11-27-2009, 04:40 AM
Hi,


I wanna make horizontal scrollbar in datagrid visiblity false with out using --- horizontalScrollPolicy="off".


I mean horizontalScrollPolicy="on" for datagrid and wanna make horizontal scroll bar visible=false;


Any idea how to do that?


Thanks & Regards

Pratap

JustinJDW
12-01-2009, 01:43 AM
in your package imports...

import mx.core.mx_internal;

in your code...

protected function showHorizontalScrollBar(show:Boolean=true) : void
{
var hScrollBar : ScrollBar = myDatagrid.mx_internal::scroll_horizontalScrollBar ;
if (hScrollBar)
hScrollBar.visible = show;
}