冻结dgv列【封装DGV】

if (dgvRecord.Grid.DisplayLayout.Bands[0].Columns.Exists(nameof(DrugInout.DgInfo)) == true)
 {
    dgvRecord.Grid.DisplayLayout.Bands[0].Columns[nameof(DrugInout.DgInfo)].Header.Fixed = true;
 }

实现效果

原文地址:https://www.cnblogs.com/yuanshuo/p/13683778.html