Unplanned
Last Updated: 09 Nov 2020 17:07 by ADMIN
Created by: John S.
Comments: 0
Category: TreeList
Type: Bug Report
2
Add/Edit/Remove columns using the TreeListColumn Collection Editor in VS Design mode is not working.
Unplanned
Last Updated: 16 Oct 2018 14:14 by Attila Antal
ADMIN
Created by: Attila Antal
Comments: 0
Category: TreeList
Type: Bug Report
0
Workaround would be to apply the first-column indicator CSS class name in the markup. Then this class name will be inherited by the next column if the first is Hidden.

With the following markup, the rendered results, the "Parent Category ID" column header will have the "first-visible-column" CSS class name set.
<telerik:TreeListBoundColumn DataField="ID" UniqueName="ID" HeaderText="Category ID" Visible="false">
    <HeaderStyle CssClass="first-visible-column" />
</telerik:TreeListBoundColumn>

<telerik:TreeListBoundColumn DataField="ParentID" UniqueName="ParentID" HeaderText="Parent Category ID">
</telerik:TreeListBoundColumn>
OR

If applying in the Code Behind, try using the PreRenderComplete event of the Page.

protected void Page_PreRenderComplete(object sender, EventArgs e)
{
    string firstVisibleColName = RadTreeList1.RenderColumns.Where(x => x.Visible && x.Display).First().UniqueName;

    TreeListHeaderItem headerItem = RadTreeList1.GetItems(TreeListItemType.HeaderItem)[0] as TreeListHeaderItem;
    headerItem[firstVisibleColName].CssClass += " first-visible-column";
}