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);

  

你可能感兴趣的:(datagridview)