I donβt know if you know the name of the columns in advance? But if so, you can go into the "Edit Columns" of your DataGridView and just create your own columns there. In the Data category, change the "DataPropertyName" from "(none)" to the name of a class property. From there you can customize the name, if visible, size, etc. DataGrid will bind it to your DataSource.
In addition, there is the "DataGridView.AutoGenerateColumns" property, which you can set to false, so you do not need to bind all properties of your object. I also helped me help.
Sauilil
source share