RadTreeList.NoRecordsTemplate

3 posts, 0 answers
  1. Bernard
    Bernard avatar
    41 posts
    Member since:
    Jun 2010

    Posted 22 Feb 2012 Link to this post

     Hello,

    I'm trying to use the component RadTreeList and It works well !
    I've just a small problem with the oRecordsTemplate. (see attached file image002.jpg). It generates two lines. Even when I try my own template.
    Perhaps is ther something I'm doing wrong. The TreeList is generated dynamically in Page_Init().

    Thanks for your help.
    Regards
    Bernard

    protected void Page_Init()
            {
    aRadTreeList = new RadTreeList();
                //aRadTreeList.NoRecordsTemplate = new XarcNoRecordsTemplate();
                aRadTreeList.ClientSettings.Scrolling.AllowScroll = true;
                aRadTreeList.ClientSettings.Scrolling.UseStaticHeaders = true;
                aRadTreeList.AutoGenerateColumns = false;
                aRadTreeList.ClientSettings.Scrolling.ScrollHeight = Unit.Pixel(180);
                aRadTreeList.ClientSettings.Scrolling.SaveScrollPosition = true;
                TreeListBoundColumn aTreeListBoundColumn = new TreeListBoundColumn();
                aTreeListBoundColumn.DataField = @"id";
                aTreeListBoundColumn.UniqueName = @"id";
                aTreeListBoundColumn.HeaderText = @"ID";
                aRadTreeList.Columns.Add(aTreeListBoundColumn);
                TreeListImageColumn aTreeListImageColumn = new TreeListImageColumn();
                aTreeListImageColumn.UniqueName = @"imageColumn";
                aTreeListImageColumn.HeaderText = @"Type";
                aTreeListImageColumn.ImageUrl = @"~/images/excel.png";
                //aTreeListImageColumn.ImageWidth = Unit.Pixel(20);
                //aTreeListImageColumn.ImageHeight = Unit.Pixel(20);
                aRadTreeList.Columns.Add(aTreeListImageColumn);
                aTreeListBoundColumn = new TreeListBoundColumn();
                aTreeListBoundColumn.DataField = @"name";
                aTreeListBoundColumn.UniqueName = @"name";
                aTreeListBoundColumn.HeaderText = @"Nom";
                aRadTreeList.Columns.Add(aTreeListBoundColumn);
                string[] aStringArr = new string[1];
                aStringArr[0] = @"id";
                aRadTreeList.DataKeyNames = aStringArr;
                aRadTreeList.ClientDataKeyNames = aStringArr;
                aStringArr = new string[1];
                aStringArr[0] = @"idPere";
                aRadTreeList.ParentDataKeyNames = aStringArr;
                aRadTreeList.NeedDataSource += new EventHandler<TreeListNeedDataSourceEventArgs>(RadTreeList_NeedDataSource);
                aRadTreeList.ItemDataBound += new EventHandler<TreeListItemDataBoundEventArgs>(RadTreeList_ItemDataBound);
                aRadTreeList.ClientSettings.ClientEvents.OnItemDblClick = @"ItemDblClick";
                aRadTreeList.Width = Unit.Percentage(100);
                RadTreeListDocDiv.Controls.Add(aRadTreeList);
     }
  2. Antonio Stoilkov
    Admin
    Antonio Stoilkov avatar
    530 posts

    Posted 27 Feb 2012 Link to this post

    Hello Bernard,

    Thank you for reporting this issue. I have updated your Telerik points. You could resolve your issue by setting UseStaticHeaders to false when the items in the data source are zero. Additionally, you can follow the bug status with the provided information below:
    • You can follow the PITS Issue by its ID: 9945 
    • Here you can find the PITS Issue: Public URL  

    Regards,
    Antonio Stoilkov
    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
  4. Bernard
    Bernard avatar
    41 posts
    Member since:
    Jun 2010

    Posted 27 Feb 2012 Link to this post

    Hi Antonio,
    Many thanks for your tip ! It works...
    Regards
    Bernard
Back to Top