且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在紧凑的框架DataGrid中添加按钮?

更新时间:2022-05-15 02:44:31

您可以使用DataGrid的

You can use the DataGrid's

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);

显示选定单元格上的按钮(或其他控件)。

to show a Button (or another control) over the selected cell.

致谢,
tamberg

Regards, tamberg