Why column count is 0 for GridView

前端 未结 5 860
春和景丽
春和景丽 2021-01-28 04:37

Friends, I\'m populating a GridView in my asp.net application using following code.

    GridView grdExport = new GridView();
    DataSet dsRecord = objHelper.gRe         


        
5条回答
  •  感动是毒
    2021-01-28 04:57

    Instead ?grdExport.Columns.Count. This count you get when you add columns collection in gridview at design time. You have to use grdExport.Rows[0].Cells.Count

提交回复
热议问题