Nome Cognome
Nome Cognome

Reputation: 68

Datagridview modifying columns in VB.NET

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

Answers (1)

Vishal Parmar
Vishal Parmar

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

Related Questions