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

RadTreeList.NoRecordsTemplate

2 Answers 56 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Bernard
Top achievements
Rank 1
Bernard asked on 22 Feb 2012, 04:06 PM
 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 Answers, 1 is accepted

Sort by
0
Antonio Stoilkov
Telerik team
answered on 27 Feb 2012, 03:46 PM
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.
0
Bernard
Top achievements
Rank 1
answered on 27 Feb 2012, 05:59 PM
Hi Antonio,
Many thanks for your tip ! It works...
Regards
Bernard
Tags
TreeList
Asked by
Bernard
Top achievements
Rank 1
Answers by
Antonio Stoilkov
Telerik team
Bernard
Top achievements
Rank 1
Share this question
or