将数据从一种形式添加到datagridview到另一种形式 [英] To add data to a datagridview from one form to another form

查看:79
本文介绍了将数据从一种形式添加到datagridview到另一种形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hai朋友,我需要即时帮助....

-c#
-赢奖形式

我需要将数据从form1添加到datagridview到form2 ...

datagridview在form1中,当celleditbegin事件启动时,将显示form2,然后当我在form2中按关闭按钮时,form2中的数据将自动转到form1的datatagridview....

请帮助我,我需要完成该项目....

hai friends i need an immediate help....

-- c#
-- win form

I need to add data to datagridview from form1 to form2...

datagridview is in form1,when celleditbegin event start the form2 will show and then when i press a close button in form2 the data in form2 will be gone to datatagridview of form1 automatically....

plz help me i need to complete the project....

推荐答案

不要告诉我们如何快速地为您提供帮助,这里免费提供帮助.

您可以使用委托在form1的form2调用代码中创建事件,尽管您希望事件在close事件上发生,但这并不是真正需要的.关闭数据后,只需从表单对象访问数据即可.您如何才能完成一个不了解基本入门级C#的项目?也许您应该买一本书并阅读?我认为目前没有人为您的代码付钱吗?
Don''t tell us how fast to help you, help here is free.

You can use a delegate to make an event in form2 call code in form1, although as you want it to happen on the close event, that''s not really needed. Just access the data from the form object after you close it. How can you have a project to complete, and not know basic, entry level C# ? Perhaps you should buy a book and read it ? I assume no-one is paying for your code at this point ?


这篇关于将数据从一种形式添加到datagridview到另一种形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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