Reputation: 68
i made a form with a DataGridView that is connected to a SQL table. in visual studio graphic design i cant see the tables: Visual graphic but when i execute the program i see the columns because it loads them in the datagridview, executed program is there a way i can modify the widht, text color.. etc..?
Upvotes: 0
Views: 57
Reputation: 545
you can programmatically set grid view.
datagridviewname.Columns["Columnname"].Visible = false;
datagridviewname.Columns["Columnname"].HeaderText = "ColumnnameYouwant";
datagridviewname.Columns["Columnname"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
Upvotes: 2