没有SQL数据集的数据网格视图 [英] Data Grid View without SQL dataset

查看:67
本文介绍了没有SQL数据集的数据网格视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在没有数据库数据集的情况下显示DataGridView?

Can DataGridView be displayed without a dataset from a database? How is this done?

推荐答案

您不必将datagrid绑定到源.您可以动态添加行和列.例如:

this.dataGridView1.Rows.Add(a, b, c);

您还可以绑定到未通过数据库填充的数据源.
You don''t have to bind the datagrid to a source. You can add rows and columns dynamically. For example:

this.dataGridView1.Rows.Add(a, b, c);

You can also bind to a data source that is not populated via database.


简短的回答,是的,以编程方式创建一个数据集...
Short answer, yes, create one dataset programmatically...


具有外观 ^ ]


这篇关于没有SQL数据集的数据网格视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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