TreeList Nestedlevel count

3 posts, 0 answers
  1. mohamed
    mohamed avatar
    311 posts
    Member since:
    Mar 2011

    Posted 28 Jan 2013 Link to this post


    how to find treelist nestedlevel count in
    See the image that example have four level that i want to find in itemdatabound

    protected void RadTreeListWork_ItemDataBound(object sender, TreeListItemDataBoundEventArgs e)
            {
                if (e.Item is TreeListDataItem)
                {
                    TreeListDataItem item = (TreeListDataItem)e.Item;


    Thanks Advance,
    Mohamed.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 04 Feb 2013 Link to this post

    Hi,

    Try the following code to achieve your scenario.
    C#:
    protected void RadTreeList1_ItemDataBound(object sender, Telerik.Web.UI.TreeListItemDataBoundEventArgs e)
    {
        if (e.Item is TreeListDataItem)
        {
            TreeListDataItem item = (TreeListDataItem)e.Item;
            int index = item.HierarchyIndex.NestedLevel;
         }
    }

    Thanks,
    Shinu
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. mohamed
    mohamed avatar
    311 posts
    Member since:
    Mar 2011

    Posted 04 Feb 2013 Link to this post

    Thanks for your reply a already solve this problem.
    i pass value from database .


    Regards,
    RMS.
Back to Top