如何在紧凑的框架DataGrid中添加按钮? [英] How to add a button to a compact framework DataGrid?

查看:56
本文介绍了如何在紧凑的框架DataGrid中添加按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Is it possible to add a button to a column in the DataGrid for the compact framework? So far the only thing I can find is you can add textbox and that's it. What would be a good alternative to a DataGrid that can allow other controls?

推荐答案

您可以使用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

这篇关于如何在紧凑的框架DataGrid中添加按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆