【发布时间】:2011-01-29 20:18:54
【问题描述】:
我有一个 datagridview 正在填充来自不同表的列。我想根据当前行的另一列过滤该列。我尝试使用datagridview的单元格输入事件,然后通过过滤当前行列上的绑定源来过滤列。
private void lINKDataGridView_CellEnter(object sender, DataGridViewCellEventArgs e)
{
this.pROBLEMBindingSource.Filter = "item_id = " + this.lINKDataGridView.Rows[e.RowIndex].Cells[dataGridViewTextBoxColumn4.Index].Value + "";
}
这就是我在 datagridview 的单元格输入事件上过滤“问题”绑定源的方式。它工作正常,但出现错误:System.ArgumentException:DataGridViewComboBoxCell 值无效。
任何建议
【问题讨论】:
标签: c# events datagridview