我在datagridview中确实有一个按钮,我想在Windows窗体中单击按钮时添加新行. [英] I do have a button in datagridview and i want to add new row on button click in windows form.How to do this?

查看:75
本文介绍了我在datagridview中确实有一个按钮,我想在Windows窗体中单击按钮时添加新行.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过单元格点击事件对此进行了尝试.但这不是期望的输出,因为它为单元格中的任何位置的单击提供了新行.我想在buttonclick上添加新行,并且按钮在datagridview中. datagridview已绑定数据.

I tried with this by cell click event. But this is not the desired output as it is giving new row for a click anywhere on cell. i want new row on buttonclick and button is in datagridview. datagridview is databound.

推荐答案

您的问题对我来说并不明确,但是这里给了您一些链接,可能会对您有所帮助.
DataGridView图像按钮单元格 [ http://www.c- sharpcorner.com/Forums/Thread/58711/add-buttons-dynamically-in-the-datagridview-windows-forms.aspx [
Your question is not clear for me, But here am giving you some links, that may help you.
DataGridView Image Button Cell[^]
http://www.c-sharpcorner.com/Forums/Thread/58711/add-buttons-dynamically-in-the-datagridview-windows-forms.aspx[^]

Thanks
--RA


这篇关于我在datagridview中确实有一个按钮,我想在Windows窗体中单击按钮时添加新行.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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