add boundField to gridview in codebehind file C#
问题 I want to create new gridview in codebehind file asp.net C#. Exactly I want to add such boundfield to the gridview by c# code: <asp:BoundField DataField="p_type" HeaderText="type" ItemStyle-Width="70px"> <ItemStyle Width="70px"></ItemStyle> </asp:BoundField> I crated new gridview with following code: GridView GridView1 = new GridView(); GridView1.AllowPaging = false; GridView1.CellPadding = 4; GridView1.GridLines= GridLines.None; GridView1.AutoGenerateColumns = false; And I want to add new