如何在C#.net Windows应用程序中没有数据库的情况下将文本框中的文本传递到数据gridview? [英] How to pass text in text boxes to data gridview without having a database in C#.net windows application?
本文介绍了如何在C#.net Windows应用程序中没有数据库的情况下将文本框中的文本传递到数据gridview?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
完成数据输入文本框后,我想将文本框中的文本传递到数据gridview单元格.最好在没有数据库的情况下完成此操作.
这是一个C#.net Windows应用程序.
请帮我.
I want to pass text in text boxes to the data gridview cells once I finished the data entering in to the text boxes.This is better to be done without having a database.
This is a C#.net windows application.
Pls kindly help me.
推荐答案
假设您不想使用绑定,那么DataGridView类上的所有信息都是 ^ ].您只需使用各种类方法来创建列和行并添加数据.
Assuming you mean that you do not want to use binding then all the information on the DataGridView class is here[^]. You just use the various class methods to create columns and rows and add your data.
使用此;)
datagridview.rows [0] .cells [0] .value = textbox.text;
use this ;)
datagridview.rows[0].cells[0].value=textbox.text;
这篇关于如何在C#.net Windows应用程序中没有数据库的情况下将文本框中的文本传递到数据gridview?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文