GridDataBoundGrid + Treeview in a combobox

Hello,

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.

Karsten

4 Replies

AD Administrator Syncfusion Team August 15, 2006 11:41 PM UTC

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.

http://www.syncfusion.com/Support/user/uploads/CS_663b5a4.zip



KB Karsten Brocksieper August 16, 2006 07:42 PM UTC

Hi Clay,

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

Karsten


KB Karsten Brocksieper August 17, 2006 08:40 AM UTC

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.

Karsten



AD Administrator Syncfusion Team August 17, 2006 11:10 AM UTC

Hi Karsten,

Please try this code

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

Thanks,
Haneef

Loader.
Up arrow icon