Sort column highlighting

7 posts, 0 answers
  1. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 27 Jan Link to this post

    Hi,

    On the RadGrid there is a css style that you can use to give a deeper shade to the sorted column.  Is there an eqivalent for the TreeList?  Looking at the CSS I couldn't find one...

    Regards

    Jon

  2. Eyup
    Admin
    Eyup avatar
    3009 posts

    Posted 01 Feb Link to this post

    Hello Jon,

    Your assumption is correct. Currently this behavior is no built-in for the RadTreeList. You can log it as a feature request in our improvements portal and the dev team may consider implementing it for the upcoming releases:
    http://feedback.telerik.com/Project/108


    If you prefer, I can create a new sample web site to demonstrate a possible workaround and send it to you.

    Regards,
    Eyup
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 01 Feb Link to this post

    Hi Eyup,

    Would the work around be a nice easy one?  If so yes please.  Otherwise it's not a major concern for me but could see that others might need it

    Regards

    Jon

  5. Eyup
    Admin
    Eyup avatar
    3009 posts

    Posted 04 Feb Link to this post

    Hello Jon,

    You can try the following approach:
    protected void RadTreeList1_PreRender(object sender, EventArgs e)
    {
        foreach (string colName in RadTreeList1.SortExpressions
            .Cast<TreeListSortExpression>().Select(x => x.FieldName))
        {
            foreach (TreeListDataItem item in RadTreeList1.Items)
            {
                TableCell cell = item[colName];
                cell.BackColor = System.Drawing.Color.Lime;
            }
        }
    }

    Regards,
    Eyup
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 04 Feb in reply to Eyup Link to this post

    Thanks Eyup, 

    That looks like it should do the job however I'm using VB.NET and am not sure how to change that cast expression over.  I've had a few goes and each is proving a failure, could you do the code in VB please?

     Many thanks,

    Jon

  7. Eyup
    Admin
    Eyup avatar
    3009 posts

    Posted 09 Feb Link to this post

    Hi Jon,

    You can try the following snippet:
    Protected Sub RadTreeList1_PreRender(sender As Object, e As EventArgs)
        For Each colName As String In RadTreeList1.SortExpressions.Cast(Of TreeListSortExpression)().[Select](Function(x) x.FieldName)
            For Each item As TreeListDataItem In RadTreeList1.Items
                Dim cell As TableCell = item(colName)
                cell.BackColor = System.Drawing.Color.Lime
            Next
        Next
    End Sub

    As generated by the http://converter.telerik.com/.

    Regards,
    Eyup
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  8. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 09 Feb in reply to Eyup Link to this post

    Many thanks Eyup, that worked although I think yesterday I had something similar but hadn't added in the linq reference !  Oops.

     

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017