0

Hi,

I have a custom combobox (say ComboExt). I need to host this control in datagridview. In MSDN (http://msdn.microsoft.com/en-us/library/7tas5c80.aspx), they are saying, to host custom controls, my own column types with cells should be created. That is, I need to create a custom ComboExtColumn derived from DataGridViewColumn and all properties in DataGridViewComboBoxColumn like DataSource,Items, AutoComplete etc should be implemetend. I feel it is very complicated.

My question is, Could I use DataGridViewComboBoxColumn instead of DataGridViewColumn to host my custom combobox(ComboExt) in DataGridView like as below?

public class ComboExtColumn : DataGridViewComboBoxColumn
{   
    //Code        
}
public class ComboExtCell : DataGridViewComboBoxCell
{
   //Code 
}
class ComboExtEditingControl : ComboExt, IDataGridViewEditingControl
{
}

Please provide some idea. Sorry for my bad English.

2
Contributors
2
Replies
13
Views
4 Years
Discussion Span
Last Post by NidhiSree
0

Your English is as good as mine. :)
I don't see why you could not do what you are trying to do.
You only got to have some indebt knowledge of all the objects involved. In the beginning this can look very complex, I know. The more you are using and manipulating DataGridView, the less hazier it will become.
A good way to start is to download and read this document
Succes!

Edited by ddanbe: added content

0

Thank you very much. I will look into it.
Mean time I started working on it. Will update soon

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.