Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How do i cange the size per column of a datagrid view?
Posted
Comments
DamithSL 29-May-14 22:47pm    
you can find lot of solution, Google[^] will help you.
please be specific, add information like related code, attempts to solve the issue etc.
Tejas Dhamankar 30-May-14 4:27am    
u can set in runtime by direct calling DataGridView.Columns(0).Width = 60 'pixels here.
or just to let it set automatically Set this line DataGridView.DataGridViewAutoSizeColumnMode.DisplayedCells or AllCells.
You can find the same in Properties window in Form Designer.
charliedev 2-Jun-14 23:33pm    
thanks

1 solution

You can change gridview column size in VB.net using DataGridViewColumn.Width Property

Read more about this property and how to use here :
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcolumn.width(v=vs.110).aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900