5

是否可以为紧凑框架的 DataGrid 中的列添加按钮?到目前为止,我唯一能找到的是您可以添加文本框,仅此而已。什么是可以允许其他控件的 DataGrid 的一个很好的替代方案?

4

1 回答 1

3

您可以使用 DataGrid 的

public Rectangle GetCellBounds(int row, int col);

public event EventHandler CurrentCellChanged;
public DataGridCell CurrentCell { get; set; }

或者

public event MouseEventHandler MouseMove;
public HitTestInfo HitTest(int x, int y);

在选定的单元格上显示一个按钮(或另一个控件)。

问候,坦伯格

于 2008-11-13T01:00:08.600 回答