DataGridView 动态绑定列

  this.yycSgv.Columns.Clear();
            //define class
            System.Web.UI.WebControls.BoundField field;
            //instantiation class
            field = new BoundField();
            field.DataField = "TypeName";
            field.HeaderText = "整机类型";
            this.yycSgv.Columns.Add(field);

  

转载于:https://www.cnblogs.com/liulf/archive/2011/08/30/2159976.html

你可能感兴趣的:(DataGridView 动态绑定列)