This is a migrated thread and some comments may be shown as answers.

Combobox with nested treeview in a radgrid???

3 Answers 119 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
KevinMc
Top achievements
Rank 1
KevinMc asked on 11 Jul 2008, 02:07 PM
Anyway to get this working? The example for nesting a treeview in a combobox won't work because the javascript acts on the clientid of the combobox which would have as many different clientids as there are rows in the radgrid. i am trying to create a bulk insert tool using radgrid. Any suggestions for a better way would be aprreciated as well.

3 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 11 Jul 2008, 04:30 PM
Hi KevinMc,

Actually, this is an interesting case.

Please consider the following:
  • Upon binding of the Grid rows, find both RadComboBox and the RadTreeView in each bound row.
  • Set the ClientID of the ComboBox as a Custom Attribute of the TreeView.
  • Later at the client, in the nodeClicking function get this attribute by name and find the ComboBox using the attribute as ID.
In this way you will successfully get each TreeView's respective ComboBox upon Node clicking.

What do you think?
Sincerely yours,
Simon
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
KevinMc
Top achievements
Rank 1
answered on 14 Jul 2008, 09:05 PM
Sounds good. Can you perhaps create an example? I am having trouble with step 1 getting a reference to the treeview in the combobox using findcontrol.



 RadComboBox comboParent = FormView1.FindControl("comboParent");  
 RadTreeView treeParentProducts = (RadTreeView)comboParent.Items[0].FindControl("treeParentProducts");  
 comboProducts.Attributes.Add("TreeView-ClientID", treeParentProducts.ClientID); 
0
Simon
Telerik team
answered on 17 Jul 2008, 04:11 PM
Hi KevinMc,

Here is a sample page illustrating the approach.

I hope it helps.

Sincerely yours,
Simon
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ComboBox
Asked by
KevinMc
Top achievements
Rank 1
Answers by
Simon
Telerik team
KevinMc
Top achievements
Rank 1
Share this question
or