Friends, I\'m populating a GridView in my asp.net application using following code.
GridView grdExport = new GridView(); DataSet dsRecord = objHelper.gRe
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