Issue with value of DataTextField

6 posts, 0 answers
  1. Giorgos
    Giorgos avatar
    18 posts
    Member since:
    Apr 2013

    Posted 14 Oct 2013 Link to this post

    I have the following RadDropDownTree on my page:

    <telerik:RadDropDownTree ID="rddtrForeas" runat="server" 
      EnableFiltering="True"
      DefaultMessage="Select sth"
      DataTextField="Title"           
      DataFieldID="SomeId"  
      CheckBoxes="SingleCheck"            
      ExpandNodeOnSingleClick="true"  
      D
    ataValueField="SomeId"  
      DefaultValue="-1" 
      DataFieldParentID="ParentId">
         <ButtonSettings ShowCheckAll="False" ShowClear="true"></ButtonSettings>
         <DropDownSettings Height="400" AutoWidth="Enabled" CssClass="mis-rddtree" OpenDropDownOnLoad="False" ></DropDownSettings><br>           
         <
    FilterSettings Filter="Contains" FilterTemplate="ByText" Highlight="Matches" EmptyMessage="Write here for filtering" ></FilterSettings>
    </telerik:RadDropDownTree>

    In my code behind inside Page_Load  I set the DataSource to a list of three items. I then perform data bind and then set the
    SelectedValue to the Ids of the first and second item.

    I have noticed that if the "Title" field of my objects contains two consecutive blank spaces or ends with a blank space the drop down
    tree control does not function properly. I.e. you cannot deselect in any way the node with the "problematic" title.

  2. Giorgos
    Giorgos avatar
    18 posts
    Member since:
    Apr 2013

    Posted 14 Oct 2013 Link to this post

    Try binding for example to the following list object (inside Page_Load):

    List<TreeEntry> lstData = new List<TreeEntry> {
       new TreeEntry { ParentId = null, SomeId = -100, Title = "First "},
        new TreeEntry { ParentId = -100, SomeId= 39252, Title = "Some  text"},
        new TreeEntry { ParentId = -100, SomeId = 39286, Title = "Third "}
                        };
    rddtrForeas.DataSource = lstData;
    rddtrForeas.DataBind();
    rddtrForeas.SelectedValue = "39252, 39286";



  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Giorgos
    Giorgos avatar
    18 posts
    Member since:
    Apr 2013

    Posted 16 Oct 2013 Link to this post

    Did anyone have a look on this issue? 
  5. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 16 Oct 2013 Link to this post

    Hello Giorgos,

    I setup a sample from the provided code and everything is working fine at my side. Could you please test the attached project and modify it in order to replicated the described behavior. In case that the issue appears without modifications let me know which version of the controls and browser you are using.

    Regards,
    Peter Filipov
    Telerik
    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 the blog feed now.
  6. Giorgos
    Giorgos avatar
    18 posts
    Member since:
    Apr 2013

    Posted 16 Oct 2013 Link to this post

    I added a new web form page to my existing project and copied inside it the code from my original post.
    The issue is not reproducible.
     
    However If I place the page containing the rad drop down tree inside a rad window that opens from another page
    then the issue pops up again:

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">

        function openRadWindow() {
            var oWnd;
            oWnd = $find("<%=rwDropDownTree.ClientID %>");        
            oWnd.Show();
        }
    ...

    and

    <telerik:RadWindowManager ID="rwmDialogs" runat="server" EnableShadow="true">
        <Windows>
            <telerik:RadWindow ID="rwDropDownTree" 
                runat="server"  
                NavigateUrl="~/App_WebForms/Files/PageWithRadDropDownTree.aspx"
                Modal="true"              
                InitialBehaviors="Default" 
                Width="850" Height="590">
            </telerik:RadWindow>

        </Windows>
    </telerik:RadWindowManager>



  7. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 18 Oct 2013 Link to this post

    Hi Giorgos,

    I have setup a sample from the provided code and still I could not reproduce the issue. Please test the attached project and modify it if needed.

    Regards,
    Peter Filipov
    Telerik
    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 the blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017