Hi allI am using "NetAdvantage 2009.2" and I am tryingto add a TreeView to a column.Does anybody know how to add a TreeView Controlto a UltraGrid Column ?The treeview is instanced and loaded. On the treeviewclick, the selected node as text will be returned into the cell value.Thanks for any help .Best regardsFrank Uray
frank_uray said:It is working fine now, I just need to find out the right events for gettingdata back from the Treeview into the cell.
Well, I would use MouseUp and KeyPress events of the tree. That way when the user clicks on a node in the tree or uses the keyboard to select a node and presses Enter it will update the cell based on the tree's ActiveNode.
Hi MikeThanks, now I got it ... :-)))I did read the sample, but I always was thinking I dont need a editor ... I need a Treeview ... :-))It is working fine now, I just need to find out the right events for gettingdata back from the Treeview into the cell.Best regardsFrank Uray
Hi Frank,
That's correct up to a point, but you seem to have stopped mid-way through the sample code. A button is not an editor. You need to put that button into an editor, such as UltraTextEditor's ButtonsRight collection. Then you use the UltraTextEditor as the EditorComponent of the column.
Hi MikeDo I understand right, I have to create a DropDownEditorButton and placemy control (treeview) on it ? Like this ?DropDownEditorButton button = new DropDownEditorButton();button.Control = MyTreeView;But how do I tell the Grid column to use this button (TreeView) ?DisplayLayout.Bands[0].Columns["Test"].??When I use .Editor I get a conversion exception:"Cannot implicitly convert type 'Infragistics.Win.UltraWinEditors.DropDownEditorButton' to 'Infragistics.Win.EmbeddableEditorBase'"Can you give me some more help on that ?Thanks and best regardsFrank Uray
The link describes how you use an editor (an UltraTextEditor is used in the example) to place a dropdown button in a grid cell that has a control on it. The control you place on the dropdown can be anything you want - in your case, you want a tree control.