Can we change header text property?

3 posts, 1 answers
  1. Morteza
    Morteza avatar
    2 posts
    Member since:
    Jul 2012

    Posted 18 Jul 2012 Link to this post

    We use drawcolumnheader event in winform listview for changing font and color of column header.
    Can we change these property of header of each column in telerik listview?
    for example how can I use smaller font  in my header?
  2. Answer
    Morteza
    Morteza avatar
    2 posts
    Member since:
    Jul 2012

    Posted 19 Jul 2012 Link to this post

    I found answer!
    Here said Telerik Presentation Framework  allows to use HTML tags to format the visual elements.
    By this point I could change my text size or another text property in column header.
    Thank you for your documentation.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 20 Jul 2012 Link to this post

    Hello Morteza,

    Thank you for writing.

    The solution provided in your last post is valid, so I am marking it as answer. Alternatively, you can you the CellFormatting event of the control. Here is a sample:
    void radListView1_CellFormatting(object sender, ListViewCellFormattingEventArgs e)
    {
        if (e.CellElement is DetailListViewHeaderCellElement)
        {
            e.CellElement.BackColor = Color.Red;
        }
        else
        {
            e.CellElement.ResetValue(LightVisualElement.BackColorProperty);
        }
    }

    More information regarding this matter can be found here: http://www.telerik.com/help/winforms/listview-custom-items.html.

    I hope this helps.
     
    Kind regards,
    Stefan
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Back to Top