Jan Tacci
Jan Tacci

Reputation: 3211

C# I Need A Control That Works Like A DataGridView But Allows Me To Add A Custom Control

I have an application that needs to display 1 to N custom controls in a grid (one control per row) and allow the user to select one row at a time.

I tried using DataGridView but that only allows Text, Button, Checkbox, ComboBox, Image, and Link.

Is there a control similar to DataGridView that allows me to insert any arbitrary custom control?

Thanks!

Upvotes: 1

Views: 436

Answers (1)

KV Prajapati
KV Prajapati

Reputation: 94653

You can create a custom column by extending the DataGridViewColumn and DataGridViewCell classes. Have a look at MSDN article - How to: Host Controls in Windows Forms DataGridView Cells.

Upvotes: 3

Related Questions