This is a migrated thread and some comments may be shown as answers.

Hide Columns In Rad Grid View

5 Answers 3044 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Brant
Top achievements
Rank 1
Brant asked on 06 Jul 2011, 11:21 PM
I am new to Telerik Winforms/ASP toolkit.  I have been previously using infragistics.  I am trying to hide a column in a gridview after I send a datatable to the datasource of the grid.  I am trying to find a visible property of the column, but unable to do so.  All the posts I have seen show that you have to loop through the entire grid setting the cell's visible property to false. 

Is there an easy way to do the following or do I really have to loop through the entire grid?

RadGridView1.Columns("id").visible = false 

5 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 10 Jul 2011, 12:34 PM
Hello Brant,

Thank you for contacting us. You can do this by setting the IsVisible property. Here is a sample:
RadGridView1.Columns("id").IsVisible = False

If you have any other questions, do not hesitate to ask.

Kind regards,
Jack
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
abdulmajeed
Top achievements
Rank 1
answered on 20 Jan 2016, 02:24 PM
RadGridView1.Columns("id").IsVisible = False is deprecated now. Please let me know the alternative?
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 21 Jan 2016, 03:45 PM
Hello,

Thank you for writing.

The GridViewColumn. property is not marked as deprecated in the latest version Q1 2016. You can find attached a sample project for your reference.

I hope this information helps. Should you have further questions I would be glad to help.
 
Regards,
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Clara
Top achievements
Rank 1
answered on 13 Oct 2017, 09:05 AM

Hi, 

I have a RadGrid that includes a Context Menu when users press right click in the columns header that gives them the possibility to hide the specific column. It is okay for me, but the problem I have is when users want to have the column visible again. How do I achieve that? Should I add the option "show hide column" to the context menĂº? do you have a predefine option to do that?

I'm quite new at this,

Thanks a lot in advance!

BTW: I'm using Winforms.

Waitting for your response...

 

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 13 Oct 2017, 11:14 AM
Hello, Clara,  

Thank you for writing.  

The visibility of all columns can be managed by the end-user at runtime using Column Chooser window. Additional information is available in the following help article: https://docs.telerik.com/devtools/winforms/gridview/end-user-capabilities/column-chooser

I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
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.
Tags
GridView
Asked by
Brant
Top achievements
Rank 1
Answers by
Jack
Telerik team
abdulmajeed
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Clara
Top achievements
Rank 1
Share this question
or