Rowel Virgo
asked on
How to set DataGridView Column size VB.net
Dim cmd As New MySqlCommand
Dim myDA As New MySqlDataAdapter(cmd)
Dim myDT As New DataTable
cmd.Connection = conn
cmd.CommandText = "SELECT * FROM esd_user;"
myDA.Fill(myDT)
DataGridView2.DataSource = myDT
That's how I put data from server to Datagridview, how can I set the specific size for each column to fit it into the form ?
Thank you for the Help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks it works! I am now using a SQL, thanks for the TUT (links) sir
Please don't forget to close the question. Have a great day.
ASKER
TY
Not a problem Rowell, glad to help.
Open in new window
DataGridViewColumn.Width Property
https://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcolumn.width(v=vs.110).aspx