Hide and Unhide column for Telerik grid

5 posts, 0 answers
  1. Sirisha Peyyeti
    Sirisha Peyyeti avatar
    14 posts
    Member since:
    Dec 2009

    Posted 25 Mar 2011 Link to this post

    Hi,

    Environment:
    Asp.net, C#, Telerik Rad Grid.

    We have an requirement to hide and unhide the column of telerik rad grid  by the user.
    How can be achieve in client side?

    Appreciate your earliest reply.

    Thanks,
    Sreenivas

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 25 Mar 2011 Link to this post

    Hello Sirisha,

    Try the following code snippet to hide/show columns in RadGrid.

    ASPX:
    <telerik:GridBoundColumn DataField="EmployeeID"  UniqueName="EmployeeID">
    </telerik:GridBoundColumn>

    C#:
    (RadGrid1.MasterTableView.GetColumn("FirstName") as GridBoundColumn).Display = false;//hide GridBoundColumn
     
    (RadGrid1.MasterTableView.GetColumn("FirstName") as GridBoundColumn).Display = true;//show GridBoundColumn

    Thanks,
    Princy.
  3. Kranthi
    Kranthi avatar
    9 posts
    Member since:
    Jul 2012

    Posted 06 Jul 2012 Link to this post

    Hey can u tell me how to retrieve the hidden column value

    my requirement is to retrive the values of those whose checkboxes are check under a button click event in radgrid.. pls help me out
  4. Sk
    Sk avatar
    9 posts
    Member since:
    May 2013

    Posted 18 Mar 2014 Link to this post

    Hi Kranthi,
    you can follow the code as attached in file,i will surely help you.




  5. Freeman
    Freeman avatar
    1 posts
    Member since:
    Jul 2017

    Posted 15 Aug 2017 in reply to Princy Link to this post

    Thanks Princy. This really helped me.
Back to Top