foreach (DataGridViewRow dr in dataGridView4.Rows) { int targetColumnIndex = 6; if (dr.Cells.Count > targetColumnIndex) // validate the index if (dr.Cells[targetColumnIndex].Value.ToString() == "Processing") { dr.Visible = false; } } foreach (DataGridViewRow dg in dataGridView1.Rows) { int targetColumnIndex = 6; if (dg.Cells.Count > targetColumnIndex) // validate the index if (dg.Cells[targetColumnIndex].Value.ToString() == "Pending") { dg.Visible = false; } }
Member 13512434 wrote: I am, I'm now getting this message... An unhandled exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll Additional information: Row associated with the currency manager's position cannot be made invisible.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)