I've made a custom DataGridViewCell that displays a custom control instead of the cell; but if the DataGridView uses shared rows, then the custom control instance is also shared, so you get strange behaviour (for example, hovering over buttons highlights all the buttons). Also, I can't access the DataGridViewCell.Selected property, so I don't know what colour to paint the row.
How do I prevent a DataGridView from sharing rows? I know I can add the rows using the Rows.Add(object[]) override, but then the first row is still shared (i.e. has index -1) so the problem with colours still applies.
I need to be able to tell the DataGridView not to share a row containing a custom cell. Can that be done with attributes? Can it be done at all?