How to get a list of visible columns server-side

4 posts, 0 answers
  1. Al
    Al avatar
    249 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
    2466 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.
  3. Rahul
    Rahul avatar
    1 posts
    Member since:
    Aug 2017

    Posted 11 Aug 2017 in reply to Konstantin Dikov Link to this post


    I have tried by it show all the columns, my scenerio is , user has hidden some columns from column menu. and i need to get the columns which are currently visible

  4. Eyup
    Eyup avatar
    4081 posts

    Posted 16 Aug 2017 Link to this post

    Hi Rahul,

    You can control the client-side visibility of the columns using their Display property. You can also traverse the get_columns() collection of the MasterTableView client-side object and determine which column is currently hidden or shown using the following method:

    Progress Telerik
    Try our brand new, jQuery-free Angular 2 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