We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

GridDataBoundGrid + Treeview in a combobox

Thread ID:





47841 Aug 14,2006 08:06 AM Aug 17,2006 07:10 AM Windows Forms 4
Tags: GridControl
Karsten Brocksieper
Asked On August 14, 2006 08:06 AM


I´m searching around for a while now but haven´t found a sample which is appropriate for my needs.

I have a databound grid and I want to show a treeview control embedded in a combobox.

The only sample I have found by now is that I can show a treeview directly in a cell of a databound grid.

Is it basically possible to combine a combobox with a treeview in it in a cell of a databound grid.

Thank you very much for any samples.


Administrator [Syncfusion]
Replied On August 15, 2006 07:41 PM

We ship a sample that shows a dropdown usercontrol in a cell. You could put a Treeview in a usercontrol and then drop it as in this sample. Here is that sample modified to show a GridDataBoundGrid with a column of Dropdowms that have a TreeView in them.


Karsten Brocksieper
Replied On August 16, 2006 03:42 PM

Hi Clay,

... thank you very much for your efforts. This is exactly what I was searching for.


Karsten Brocksieper
Replied On August 17, 2006 04:40 AM

Hi Clay,

... with the help of your sample I have done it so far.

Please, one more question.

I show the treeview in the following way:

'' Show Folder in Treeview of DropDown
Me.grddbKSTZuordnung.Model.CellModels.Add("DropDownUserControl", New DropDownUserCellModel(Me.grddbKSTZuordnung.Model, New DropDownUser()))
Me.grddbKSTZuordnung.Binder.InternalColumns("Outlook_Ordner").StyleInfo.CellType = "DropDownUserControl"

Everything works fine until I have to reload my data in the grid because I have made changes in the underlying dataset.

Can you tell how I can determine if I have already add the "DropDownUserControl" to the grid because if I run the above mentioned code twice I will get an error.

Thanks again for your help.


Administrator [Syncfusion]
Replied On August 17, 2006 07:10 AM

Hi Karsten,

Please try this code

If Me.grddbKSTZuordnung.Model.CellModels.ContainsKey("DropDownUserControl") Then
Console.WriteLine("DropDownUserControl model presents in a grid")
Console.WriteLine("DropDownUserControl does not present in a grid")



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.