.NET DataGridView Edit Pencil Icon

There’s a problem when editing the DataGridView.

Problem: The pencil glyph icon in edit mode wouldn’t go away. Here’s the situation and the solution.

Solution: If the property Virtual is set to false the glyph will go away, period.

Even after doing this, a call to the EndEdit() function wasn’t required to make the glyph go away even though other people say that it’s required. Test it though to make sure. Suffice it to say that if you’re still having a problem after setting the Virtual property, then it’s something with the grid property settings or the programmatic overrides you’re doing. But this setting worked for me.

Any additional comments or concerns about this?

Leave a Reply

%d bloggers like this: