如何在没有任何数据的情况下显示gridview控件?

如何在没有任何数据的情况下显示gridview控件?

问题描述:

请建议我显示gridview控件的解决方案,而不将任何数据源分配给girdview。

Please suggest me the solution to show the gridview control without assigning any data source to the girdview .

简单地说,你不能。



参考 - GridView类 [ ^ ]。

Simply, you can't.

Refer - GridView Class[^].
Quote:

在表中显示数据源的值,其中每列代表一个字段,每行代表一条记录。 GridView 控件使您可以选择,排序和编辑这些项目。

Displays the values of a data source in a table where each column represents a field and each row represents a record. The GridView control enables you to select, sort, and edit these items.

没有 DataSource , GridView 没用。