3

I have a class that is deriveded from DataGridViewTextBoxCell and I want to add an Form.Control object (like TextBox, CheckBox ..) into that cell but there is no control object that I can add new one into it.

In other words I want to create a cell that contains multiple control object. Is there any way to do?

Thanks

Okan Çetin
  • 85
  • 1
  • 4

1 Answers1

1

Using normal Windows.Forms controls is not possible. See the documentation, where it says: you must define classes that derive from DataGridViewColumn and DataGridViewCell. Or define a class that derives from Control and implements the IDataGridViewEditingControl interface. Reason is that the control must be able to cooperate with the hosting grid in exchanging values, handling edit mode, style etc.

Gert Arnold
  • 105,341
  • 31
  • 202
  • 291
  • Thanks for reply, I had examined the documentation but as I understand this solution can be valid when cell is in edit mode but in fact I never edit the cell, I just want to show a string in a cell in a format that is each character is shown in a single TextBox or Label doesn't matter. "http://img535.imageshack.us/img535/424/unled2zg.jpg" it's like "pf_feen_token" column. – Okan Çetin Sep 06 '11 at 22:58
  • heres the link.... http://img535.imageshack.us/img535/424/unled2zg.jpg ...I also want that kind of datagridview custom column... – illumi Aug 14 '13 at 05:53