Left align text in Column

2 posts, 1 answers
  1. Rohit
    Rohit avatar
    20 posts
    Member since:
    Dec 2017

    Posted 25 Jan 2018 Link to this post


    How can I left align the text in the virtualGrid (with only one column and AutoSizeColumnsMode set to Fill).



  2. Answer
    Dess | Tech Support Engineer, Sr.
    Dess | Tech Support Engineer, Sr.  avatar
    4004 posts

    Posted 25 Jan 2018 Link to this post

    Hello, Rohit,

    Thank you for writing.  

    In order to align the cell's content in RadVirtualGrid it is suitable to use the CellFormatting event and change the CellElement.TextAlignment property:
    private void radVirtualGrid1_CellFormatting(object sender, Telerik.WinControls.UI.VirtualGridCellElementEventArgs e)
        e.CellElement.TextAlignment = ContentAlignment.MiddleLeft;

    I hope this information helps. Should you have further questions I would be glad to help. 
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top