[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More
Experts Exchange Solution brought to you by
"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.
<asp:BoundField DataField="Description" HeaderText="Item Description" ItemStyle-Width="300px" />
Open in new window
Protected Sub GrdView1_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
grdListings.Columns(0).ItemStyle.Width = 150
grdListings.Columns(1).ItemStyle.Width = 250
grdListings.Columns(2).ItemStyle.Width = 350
Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.
Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.
' Bind the DataGridView data from the database.
dataGridView.DataSource = masterBindingSource
' Resize the DataGridView columns to fit the newly loaded data.
dataGridView.Columns(0).Width = 150
dataGridView.Columns(1).Width = 250
dataGridView.Columns(2).Width = 350
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.