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

show/hide with related treeview and combobox

1 Answer 63 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Cuneyt
Top achievements
Rank 1
Cuneyt asked on 16 Jan 2013, 08:30 PM
Hi
I have 1 treeview and 1 combobox that used for filter of treeview. this two controls is one set. i have 3 set controls that have 3 related treeview and 3 filter combobox.these 3 treeviews is related each other.  I used openaccesslinqdatasource that get a selectedvalue of treeview. if OALDS has not data, treeview doesnt appear, automaticly  appears if there is data at OALDS
this is good for me. i dont need to manage to show or hide treeview.  But i have to show or hide comboboxes sametime with treeview.
how can i do that.
I tried treeview node count at serverside onnodeclick event but showing or hiding of combobox event goes one stepback from treeview. 
how can i show hide combobox sametime with these related treeview. 


1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 21 Jan 2013, 12:14 PM
Hi Cuneyt,

Unfortunately you are not able to use the SelectedIndexChanged server-side event of the RadConboBox control since once you use an ItemTemplate everything that is places in it is counted as a single RadComboBoxItem. Thus, no matter how many different nodes you will click, the SelectedIndexChanged event of the RadComboBox will not fire simply because the RadComboBoxItem did not change. One approach that you could try out, howver, is to use the OnNodeClick event of the RadTreeView control. Here is a sample code that demonstrates the described approach:
<telerik:RadComboBox ID="RadComboBox1" runat="server" Width="250px" ShowToggleImage="True"
           Style="vertical-align: middle;" OnClientDropDownOpened="OnClientDropDownOpenedHandler"
           EmptyMessage="Choose a destination" ExpandAnimation-Type="None" AutoPostBack="true"  CollapseAnimation-Type="None" Skin="Hay">
           <ItemTemplate>
               <div id="div1">
                   <telerik:RadTreeView runat="server" ID="RadTreeView1" OnClientNodeClicking="nodeClicking" OnNodeClick="RadTreeView1_NodeClick"
                       Width="100%" Height="140px" skin="Hay">
                       <Nodes>
                           ......


Greetings,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
TreeView
Asked by
Cuneyt
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or