You should look thru the help documents and review all of the DataGrid's properties. You will find properties that help you determine the width and height values and others that allow you to set whteher or not the scrollbars appear. For instance. the following could make the DataGrid adjust its size for the number of rows it holds...
dataGrid.height = dataGrid.headerHeight+dataGrid.length*dataGrid.rowHeight;
And the following will set the vertical scrollbar to not appear...
dataGrid.verticalScrollPolicy = ScrollPolicy.OFF;
Hello Ned, Thanks very much, for answer me, as you say I've viewed the help documents and review all of the DataGrid's properties, and I finded the properties of the verticalScrollPolicy and I've set the
aDg.horizontalScrollPolicy = ScrollPolicy.OFF; but it show me this error
"1119: Access to a possibly undefined ScrollPolicy property through a reference with static type fl.controls: DataGrid."
I think the error should not have because it is a property, Isn´t it?
Please, excuseme because I make a mistake I wanted to say "aDg.verticalScrollPolicy = ScrollPolicy.OFF.
instead aDg,horizontalScrollPolicy = ScrollPolicy.OFF"
Thanks in advance Ned.
You might need to import the ScrollPolicy class before you can use it...
Hello Ned, I did it, I import fl.controls.ScrollPolicy and doesn't ticking error thank you, but it does not display the list the datagrid, do you have any idea, why doesn't works?
Here is the code you advice:
aDg.height = aDg.headerHeight+aDg.length*aDg.rowHeight;
aDg.verticalScrollPolicy = ScrollPolicy.OFF;
Thanks for any help.