Problem with Treeview in combobox after installing latest release

7 posts, 0 answers
  1. Lance
    Lance avatar
    49 posts
    Member since:
    May 2008

    Posted 20 Sep 2008 Link to this post

    I  have a Treeview in a combobox that was working fine until I installed the latest version of the controls.  Now the treeview just looks like a list (no clickable expand images, etc...) 

    it basically looks like:
    • Node1
    • Node2
    • Node3
    • Node4

    Nothing in the code changed, and the treeview works fine outside of the combo box, but not inside..

    Any idea where to start looking for the problem?

  2. Serrin
    Serrin avatar
    286 posts
    Member since:
    Sep 2008

    Posted 23 Sep 2008 Link to this post

    Hey Lance,

    Does your code end up looking anything like what is in this online example?

    Treeview in ComboBox

    I just copied everything from <telerik:RadComboBox> to the closing tag and it pulls up just like in the online demo.  I'm also using the latest version, so the version shouldn't be a problem...  Maybe you could post the code you are using so we can take a stab at debugging where the problem is at? :)

    -Serrin
  3. Lance
    Lance avatar
    49 posts
    Member since:
    May 2008

    Posted 23 Sep 2008 Link to this post

    Thanks,
    It looks pretty much the same.  I am using loadOnDemand (which I was using prior to the upgrade without problem) 

    Here is the code:

     <telerik:RadComboBox ID="RadComboBox2" runat="server"   
                                    EnableEmbeddedSkins="true"  Height="320px"   
                                    Skin="Outlook" Width="450px">  
                                    <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                    <ItemTemplate> 
                                        <div id="<%= RadCombobox2.clientid %>div">  
                                        <telerik:RadTreeView ID="RadTreeView1" Runat="server" 
                                            OnClientNodeClicking="nodeClicking" 
                                            LoadingStatusPosition="BelowNodeText" 
                                            LoadingMessage="Loading..." 
                                            SingleExpandPath="true" 
                                            OnNodeExpand="RadTreeView1_NodeExpand" 
                                            AllowNodeEditing="false" 
                                            EnableDragAndDropBetweenNodes="false" 
                                            EnableDragAndDrop="false" 
                                            MultipleSelect="false" 
                                            EnableEmbeddedSkins="true"   
                                            Skin="Outlook" 
                                            ShowLineImages="true" 
                                            > 
                                            <CollapseAnimation Type="OutQuint" Duration="100"></CollapseAnimation> 
                                            <ExpandAnimation Duration="100"></ExpandAnimation> 
                                        </telerik:RadTreeView> 
                                       </div> 
                                    </ItemTemplate> 
                                    <Items> 
                                        <telerik:RadComboBoxItem Text="" /> 
                                    </Items> 
     
                                     
                                </telerik:RadComboBox> 
                                <script type="text/javascript">  
                                    var div1 = document.getElementById("<%= RadCombobox2.clientid %>div");  
                                    div1.onclick = StopPropagation;  
                                </script> 


    The code that adds the nodes serverside:
    Private Sub addNodes(ByVal parentNode As RadTreeNode, ByVal Treeview As RadTreeView)  
           'SQL Queries to populate the dataReader  
           Do Until dr.Read = False 
                Dim childNode As New RadTreeNode  
                childNode.Text = dr("Description"'IIf(dr("Description").ToString.Length > 20, Left(dr("Description"), 20) & "...", dr("Description"))  
                childNode.LongDesc = dr("Description")  
                childNode.ToolTip = dr("Description")  
                childNode.Value = dr("CatID").ToString  
                If dr("ChildCount") > 0 Then 
                    childNode.ExpandMode = TreeNodeExpandMode.ServerSideCallBack  
                End If 
                If bUseTreeRoot Then 
                    Treeview.Nodes.Add(childNode)  
                Else 
                    node.Nodes.Add(childNode)  
                End If 
     
            Loop 
    End Sub 
  4. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 23 Sep 2008 Link to this post

    Hello Lance,

    This issue is quite strange as I also tried running the example with your version of Telerik.Web.UI (2008.2 826) and it looked fine.

    Could you open a support ticket and send us a simple project or a page exhibiting the problem? We will investigate it and will try to provide a solution or a workaround. We will post the solution in this forum thread as well.

    Best wishes,
    Simon
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Lance
    Lance avatar
    49 posts
    Member since:
    May 2008

    Posted 23 Sep 2008 Link to this post

    Hi,
    I think I've narrowed it down. 
    It seems that there are several controls that need to exist on the page to cause this behavior.

    I have a page with a RadUpload control, a Progress Indicator, and the combo/treeview inside a TabStrip/MultiView. 

    Here is the ASPX, no code-behind is needed for this sample.

            <telerik:RadUpload  ID="File"  runat="server" MaxFileInputsCount="1"  Width="400" ControlObjectsVisibility="None" InitialFileInputsCount="1" AllowedFileExtensions=".zip,.ppt,.pptx,.mpg,.mpeg,.mov,.wmv,.avi" /> 
            <telerik:RadProgressManager ID="RadProgressManager1" runat="server" /> 
            <telerik:radprogressarea EnableEmbeddedSkins="true" Skin="Vista" id="progressArea1" runat="server" ></telerik:radprogressarea> 
            <script type="text/javascript">  
     
                function nodeClicking(sender, args) {  
                    var comboBox = $find('<%= RadCombobox2.clientid %>');  
                    var node = args.get_node()  
                    comboBox.set_text(node.get_text());  
                    comboBox.hideDropDown();  
                }  
                function StopPropagation(e) {  
                    if (!e) {  
                        e = window.event;  
                    }  
     
                    e.cancelBubble = true;  
                }  
     
            </script> 
          
        <telerik:RadTabStrip ID="RadTabStrip1"  CausesValidation="false" EnableEmbeddedSkins="true" Skin="Vista" MultiPageID="RadMultiPage1" SelectedIndex="0" runat="server">  
            <Tabs> 
                <telerik:RadTab runat="server" Text="Categories">  
                </telerik:RadTab> 
            </Tabs> 
        </telerik:RadTabStrip> 
          
        <telerik:RadMultiPage   BorderWidth="1px" BorderColor="#dddddd" ID="RadMultiPage1" Runat="server" SelectedIndex="0" Width="100%" Height="60px">  
            <telerik:RadPageView ID="RadPageView2" runat="server">  
                <telerik:RadComboBox ID="RadComboBox2" runat="server"   
                    EnableEmbeddedSkins="true"  Height="320px"   
                    Skin="Vista" Width="450px" ExpandAnimation-Type="None" CollapseAnimation-Type="None">  
                    <ItemTemplate> 
                        <div id="<%= RadCombobox2.clientid %>div">  
                        <telerik:RadTreeView ID="RadTreeView1" Runat="server" 
                            EnableEmbeddedSkins="true"   
                            Skin="Vista" 
                            ShowLineImages="true" 
                            > 
                            <Nodes> 
                            <telerik:RadTreeNode Text="test1"></telerik:RadTreeNode> 
                            <telerik:RadTreeNode Text="test1"></telerik:RadTreeNode> 
                            <telerik:RadTreeNode Text="test1"></telerik:RadTreeNode> 
                            </Nodes> 
                        </telerik:RadTreeView> 
                       </div> 
                    </ItemTemplate> 
                    <Items> 
                        <telerik:RadComboBoxItem Text="" /> 
                    </Items> 
     
                     
                </telerik:RadComboBox> 
                <script type="text/javascript">  
                    var div1 = document.getElementById("<%= RadCombobox2.clientid %>div");  
                    div1.onclick = StopPropagation;  
                </script> 
            </telerik:RadPageView> 
        </telerik:RadMultiPage>           
         
     
  6. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 26 Sep 2008 Link to this post

    Hi Lance,

    I tried to reproduce the issue once again but to no avail.

    Please examine the attached page. Could you point out what needs to be modified in it, so that the problem starts to appear?

    Regards,
    Simon
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. Lance
    Lance avatar
    49 posts
    Member since:
    May 2008

    Posted 26 Sep 2008 Link to this post

    The problem appearred with the code exactly as it was.  I uninstalled, and re-installed the Telerik Controls and the problem went away.  Maybe something got left from an old version or something...  Very odd, but it is working now.

    Thanks
    Lance
Back to Top