在 VB.Net 2008 中使用 DataGridView。
我想卡住左列,以便在滚动时/如果滚动此列仍保持原位。
有人能告诉我怎么做吗?
最佳答案
To freeze a column programmatically
Set the
DataGridViewColumn.Frozen
property totrue
:Me.dataGridView1.Columns("AddToCartButton").Frozen = True
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
.
关于vb.net - DataGridView - 如何卡住一列?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1903970/