Friends, I\'m populating a GridView in my asp.net application using following code.
GridView grdExport = new GridView(); DataSet dsRecord = objHelper.gRe
Your GridViewColumn Column will be set after binding your data. So just show a MessageBox.Show to find the column count.
MessageBox.Show
grdExport.AutoGenerateColumns = false; MessageBox.Show(grdExport.Columns.Count.ToString());