110,534
社区成员
发帖
与我相关
我的任务
分享
private void lvwEquipmentInfo_SelectedIndexChanged(object sender, EventArgs e)
{
DataRow[] rows = dt.Select("eq_codenum='" + this.lvwEquipmentInfo.SelectedItems[0].SubItems[1].Text.ToString() + "'"); //InvalidArgument=“0”的值对于“index”无效。 参数名: index
for (int i = 0; i < rows.Length; i++)
{
.....
}
}
int a = ((DataGridViewComboBoxCell)dataGridView.Rows[e.RowIndex].Cells["deName"]).Items.Count;
if (a > 0)
{
for (int j = a-1; j >= 0; j--)
{
try
{
MessageBox.Show(a.ToString());
((DataGridViewComboBoxCell)dataGridView.Rows[e.RowIndex].Cells["deName"]).Items.RemoveAt(j);
}
catch(Exception e1)
{
MessageBox.Show(e1.Message);
}
}
}