如题。

使用方法简写:

private List<SaleProductInfo> saleProductList = new List<SaleProductInfo>();
private BindingSource bs = new BindingSource();

public FrmSaleManage()
{
      InitializeComponent();

      this.dgvProdutList.AutoGenerateColumns = false;
}

private void Funcation()
{
       //数据绑定
       this.bs.DataSource = this.saleProductList;
       this.dgvProdutList.DataSource = null;
       this.dgvProdutList.DataSource = this.bs;
}

BindingSource提供的方法:

this.bs.MoveLast();//dgv聚焦到最后一行

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-11
  • 2021-07-20
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2021-07-01
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-02
  • 2021-08-02
  • 2021-10-15
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案