且构网

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

如何在Windows窗体中将DataGrid中的单元格值从一个窗体转移到另一个窗体?

更新时间:2023-12-06 11:37:04

首先,考虑将数据不是从控制传递到控制,而是从数据层传递到控制。



如果您仍然希望将单元格数据从一个表单传递到另一个表单(请参阅我对该问题的评论;我希望您的问题实际上是关于将数据从一个表单传递到另一个表单),请参阅我的文章一次回答多个问题 - Windows窗体或WPF Windows之间的协作 [ ^ ]。



-SA
First of all, consider passing data not from control to control, but from data layer to control.

If you still want to pass cell data from one form to another (please see my comment to the question; I hope your question is actually about passing data from one to another form), please see my article Many Questions Answered at Once — Collaboration between Windows Forms or WPF Windows[^].

—SA