for (int x = 0; x < grdCustList.Columns.Count; x++) { //get the columns underlying datafield name and type }
foreach (System.Web.UI.WebControls.BoundField bfName in grdCustList.Columns) { string currentDataField = bfName.DataField; // Do whatever you want to with it here. }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)