今天工作的时候 给GridView直接赋值list,然后点击事件开始报 索引-1 没有值 然后查了下找到了答案 ,在此记录下
BindingSource bindingSource = new BindingSource(); bindingSource.DataSource = CutList; this.dgvCutList.DataSource = bindingSource;
2023-12-30 20:37:34
今天工作的时候 给GridView直接赋值list,然后点击事件开始报 索引-1 没有值 然后查了下找到了答案 ,在此记录下
BindingSource bindingSource = new BindingSource(); bindingSource.DataSource = CutList; this.dgvCutList.DataSource = bindingSource;