show/hide with related treeview and combobox

2 posts, 0 answers
  1. Cuneyt
    Cuneyt avatar
    36 posts
    Member since:
    Dec 2011

    Posted 16 Jan 2013 Link to this post

    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. 


  2. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 21 Jan 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top