How to get a list of visible columns server-side

2 posts, 0 answers
  1. Al
    Al avatar
    216 posts
    Member since:
    Oct 2006

    Posted 12 Oct 2016 Link to this post

    Hi ,

    How can I find out which columns are visible in a server-side routine (some columns may have been shown/hidden with the header context menu)?

  2. Konstantin Dikov
    Konstantin Dikov avatar
    2048 posts

    Posted 17 Oct 2016 Link to this post

    Hello Al,

    You can traverse the Columns collection of the grid and check their Display and Visible properties:
    List<GridColumn> columns = new List<GridColumn>();
    foreach (GridColumn column in RadGrid1.MasterTableView.RenderColumns)
        if (column.Display == true && column.Visible)

    Hope this helps.

    Konstantin Dikov
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top