Does it makes sense that when columns of a datagridview are cleared, all rows are removed?
A:
In a table display such a s DataGridView, if there are no columns, there cannot be any rows, and vice versa.
Jamie
2010-03-02 09:58:36
First I was somewhat surprised that all my rows were gone after clearing the columns. But when I think about it, it does makes sense :)
Martijn
2010-03-02 10:01:11
A:
If you are removing all of the columns, then there can be no rows associated with them. You'd need at least one column in order to have rows.
Ardman
2010-03-02 10:03:50
A:
Why don't you just toggle visibility on the column instead?
dgv.Columns[sColumnName].Visible
Ken
2010-03-02 17:08:16