I working on application with DataGridView.<br>
It contains several tabs, each tab includes a DataGridView of some parameters.
I need implement Admin and User modes, where each grid table
should hide some rows according to the mode.<br>
I have a problem with the hiding: **on some tabs the hiding work perfect on other doesn't work absolutely**.<br>
I did some tests: hid all rows of problematic grid, printed Visible values after delay. <br>
used`grid.CurrentCell = null`.<br>
I didn't found any mistake that point to the reason of the problem.
I use the same method for all:
```
private void HideParameter(DataGridView grid, string ParamName)
{
CurrencyManager CM = (CurrencyManager)BindingContext[grid.DataSource];
CM.SuspendBinding();
for (int i = 0; i < grid.Rows.Count; i++)
{
string Val = grid.Rows[i].Cells[0].Value.ToString();
if (Val.Contains(ParamName))
{
//grid.CurrentCell = null;
grid.Rows[i].Visible = false;
}
}
CM.ResumeBinding();
}
```
<br[![Picture of the tabs][1]][1]>
[1]: https://i.sstatic.net/5KBXL.jpg