Try something like:
--GrowingDGItemRenderer.as-
package {
public class GrowingDGItemRenderer extends DataGridItemRenderer
{
public function GrowingDGItemRenderer()
{
mouseWheelEnabled = false;
}
}
}
Then in your column
<mx:DataGridColumn headerText=""
dataField="blockTitle" editable="false" width="300" textAlign="left"
itemRenderer="GrowingDGItemRenderer/>
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Steven
Sent: Monday, March 31, 2008 11:46 PM
To: [email protected]
Subject: [flexcoders] Disabling mouse scroll wheel for datagrid column
I am experiencing a problem where the mouse scroll wheel is causing the
text in a column of my data grid to disappear when you move the scroll
wheel.
Not sure if its the best solution but I was wondering how to disable the
mouse scroll wheel for this datagrid column or for the entire datagrid
column if that is easier.
I have seen this function (TextField.mouseWheelEnabled) but I am unsure
how to apply this to a column of a datagrid.
Here is the code of my datagrid, which incidentally I am repeating using
a repeater. It is the "blockTitle" column that is experiencing the
problem.
<local:GrowingDG x="20" y="36" showHeaders="false" width="625"
id="markSheetSectionDG" wordWrap="true" editable="true"
variableRowHeight="true" dataProvider="{markSheet10DGDataAC}" >
<local:columns>
<mx:DataGridColumn headerText=""
dataField="blockLetter" editable="false" width="30" textAlign="center"/>
<mx:DataGridColumn headerText=""
dataField="blockTitle" editable="false" width="300" textAlign="left" />
<mx:DataGridColumn dataField="blockMark"
itemRenderer="mx.controls.CheckBox"
rendererIsEditor="true"
editorDataField="selected" headerText="" editable="true"
width="50" />
</local:columns>
</local:GrowingDG>
Thanks
Paul