0

I know there are 6 types of ColumnType to select in DataGridView control in C#.

DataGridViewButtonColumn
DataGridViewCheckBoxColumn
DataGridViewComboBoxColumn
DataGridViewImageColumn
DataGridViewLinkColumn
DataGridViewTextBoxColumn

In design time, I can choose one of those for my DataGridView column.

But I want to create custom DataGridView that only DataGridViewTextBoxColumn and my custom column(which is inherits from DataGridViewColumn) are available to select.

Where do I have to look?

Joshua Son
  • 1,839
  • 6
  • 31
  • 51

1 Answers1

0

I think you will need to see how to limit what you inherit - normally when you inherit you get everything, so you will need to override the columntype filtering in the DataGridview, you wight look on github at the decompiled source of the DataGridview which should give you a good place to look for what you need to override. You can also look in the class viewer of your Visual Studio or Sharpdevelop - you might be able to get a good enough glimpse of the datagridview class to know what to override. I can create a custom column and not specify much in the way of details and yet the thing will show up in my DataGridView columntype drop down - so I would look in the datagridview class - not sure why you want to limit it - but that is some info for you.

Ken
  • 2,518
  • 2
  • 27
  • 35