Using DataGridView with VB.Net 2008. I would like to freeze the left column so that when/if scrolled this column still remains in place. can someone tell me how to do this?
How to: Freeze Columns in the Windows Forms DataGridView Control :
To freeze a column programmatically
Set the
DataGridViewColumn.Frozen
property totrue
:Me.dataGridView1.Columns("AddToCartButton").Frozen = True
How to: Freeze Columns in the Windows Forms DataGridView Control Using the Designer :
To freeze a column using the designer
- Click the smart tag glyph on the upper-right corner of the
DataGridView
control, and then select Edit Columns .- Select a column from the Selected Columns list.
- In the Column Properties grid, set the
Frozen
property totrue
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.