vb.net - DataGridView - 如何卡住一列?

标签 vb.net datagridview

在 VB.Net 2008 中使用 DataGridView。
我想卡住左列,以便在滚动时/如果滚动此列仍保持原位。
有人能告诉我怎么做吗?

最佳答案

  • How to: Freeze Columns in the Windows Forms DataGridView Control :

    To freeze a column programmatically

    Set the DataGridViewColumn.Frozen property to true:

    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

    1. Click the smart tag glyph on the upper-right corner of the DataGridView control, and then select Edit Columns.
    2. Select a column from the Selected Columns list.
    3. In the Column Properties grid, set the Frozen property to true.
  • 关于vb.net - DataGridView - 如何卡住一列?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1903970/

    相关文章:

    .net - 在 VB.NET 中获取 .NET Framework 版本

    c# - Datagridview 更新到 DB mysql 错误 ""并发冲突 : the updatecommand affected 0 of the expected 1 records""

    SQL 使用参数化 SQL 时, ","附近的语法不正确

    VB.NET "Fixing"代码克隆

    .net - 在繁忙的多线程应用程序中更新 UI 的最佳方式

    c# - WPF C# 数据网格对象引用未设置为对象的实例

    c# - 如何在拖放期间自动滚动 DataGridView

    .net - 设置Datasource后DataGridView为空

    vb.net - 将 Async CTP Await 与事件一起使用?

    mysql - vb.net 如何监控登录用户任务,例如程序中的添加、删除、更新数据