0

I'm having an issue with a custom ItemRenderer I've written for a DataGrid. With this ItemRenderer, it's possible that the contents could exceed the width and height of the DataGrid cell - and when this happens, scroll bars appear, letting me scroll the individual cell.

What I would like, however, is that when the contents of the cell are too large, the entire DataGrid scrolls, rather than the individual cells.

Now, when I set the custom ItemRenderer's horizontal and vertical scroll bar policies to "off", I get the vertical scrolling on the DataGrid that I want (the individual cells stretch to accommodate the full height of the contents) but I don't get any horizontal scrolling. Instead, any content too wide for the cell is clipped. Incidentally, setting the DataGrid's horizontal scroll bar policy to "on" has no effect, the scroll bar gutter is drawn, but nothing scrolls

Is there a way to force the DataGrid to scroll horizontally when my custom ItemRenderer's contents are too wide for the cell?

4

1 回答 1

0

您可能必须找到一种方法来计算并在画布中水平扩展 DataGrid 的大小,以便它显示所有单元格,并且滚动条将显示为画布的一部分。

于 2009-06-02T17:36:38.010 回答