如何在按钮事件中获取Datagridview的组合框和文本框值 [英] how to get Datagridview's comboboxes and textboxes values inside button event

查看:75
本文介绍了如何在按钮事件中获取Datagridview的组合框和文本框值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个gridview,包括文本框和组合框。现在我想在按钮单击事件中获取组合框和文本框的值。按钮在gridview之外,但在同一个表单上。

我该怎么办?

解决方案

使用 System.Windows.Forms.DataGridViewCell.Value 。请参阅:

http:// msdn .microsoft.com / zh-cn / library / system.windows.forms.datagridviewcell.value.aspx [ ^ ],

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcell.valuetype.aspx [ ^ ]。



看,你再次询问一些你可以在适当的MSDN文章中轻松阅读的东西,再次在 System.DataGridView 。这是指示性的。也许您需要学习一般使用控件或UI开发,或者只是学习如何使用文档。如果你要继续问这么小的问题,那就不会花太多时间,你永远不会把自己转移到实际的开发阶段。



-SA

i have a gridview which consist of textboxes and comboboxes. now i want to take the values of combobox and textboxes inside a button click event۔ Button is outside of the gridview but on a same form.
how can i do this??

解决方案

By using System.Windows.Forms.DataGridViewCell.Value. Please see:
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcell.value.aspx[^],
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcell.valuetype.aspx[^].

Look, you again ask about something which you can easily read in appropriate MSDN articles, again on System.DataGridView. This is indicative. Maybe you need to learn on using controls or UI development in general, or just learn how to use documentation. If you are going to keep asking such small question as you go, it won't take you long, you will never move yourself to actual development.

—SA


这篇关于如何在按钮事件中获取Datagridview的组合框和文本框值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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