how to use flex datagrid lockedcolumncount for two columns?
How do you use flex datagrid lockedColumnCount
for two columns?
For example, I have 5 columns of datagrid columns: A, B, C, D and E. I want the A and E columns to be locked and the remaining columns able to be scro开发者_Python百科lled horizontally.
How can I do that?
To use lockedColumnCount, do something like this:
<mx:DataGrid id="myDataGrid" lockedColumnCount="2" >
The DataGrid always locks the leftmost columns. There is no way to lock the leftmost column and the rightmost column. (As far as I know this isn't even possible in Excel). You'll have to extend the DataGrid to do this; although logistically I'm not relly seeing how it'd work.
I believe you could put two datagrids side by side.
So basically you have one hbox, with two datagrids in it.
The first with columns A thru D and the second with just E.
Set lockedColumnCount=1 on both and set the horizontalScrollPolicy=false on the second.
I havnt tried this and could be completely wrong, but hope this helps someone.
精彩评论