Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/304.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 向Gridview解释添加新行_C#_Asp.net_.net_Gridview - Fatal编程技术网

C# 向Gridview解释添加新行

C# 向Gridview解释添加新行,c#,asp.net,.net,gridview,C#,Asp.net,.net,Gridview,我在c#中有以下代码 我需要一些关于这条线的解释 GridViewRow row = new GridViewRow(0, 0, DataControlRowType.DataRow, DataControlRowState.Insert); GridViewRow的构造函数中的第一个、第二个和第四个参数是关于什么的 谢谢查看链接- rowIndex:GridView控件的Rows集合中GridViewRow对象的索引 dataItemIndex:基础数据集中DataItem的索引 rowTy

我在c#中有以下代码

我需要一些关于这条线的解释

GridViewRow row = new GridViewRow(0, 0, DataControlRowType.DataRow, DataControlRowState.Insert);
GridViewRow的构造函数中的第一个、第二个和第四个参数是关于什么的

谢谢

查看链接-

  • rowIndex:GridView控件的Rows集合中GridViewRow对象的索引
  • dataItemIndex:基础数据集中DataItem的索引
  • rowType:DataControlRowType枚举值之一
  • 行状态:DataControlRowState枚举值的按位组合
  • 这是您需要的吗?

    请参见:
    GridViewRow row = new GridViewRow(0, 0, DataControlRowType.DataRow, DataControlRowState.Insert);