Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8387023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:06:10+00:00 2026-06-09T18:06:10+00:00

I am using a datasource to populate my datagridview with the data. However, im

  • 0

I am using a datasource to populate my datagridview with the data. However, im trying to find a way for the user to be able to hide columns that he does not want to see.

I am able to hide and show columns before the program runs using:

[Browsable(false)]
public string URL
{
    get
    {
        return this._URL;
    }
    set
    {
        this._URL = value;
        this.RaisePropertyChnaged("URL");
    }
}

I cannot seem to figure out how to change the [Browsable(false)] at run time.

Any ideas how I could accomplish this?

Basically, I want to bind an “on/off” to a menu.

Apologies if im not using the right terminology when explaining my problem, I am self taught and started a few weeks ago – so still very newbie 🙂

Edit:

Cant hide the column because when i run my update function all columns appear again. Here is my function for updating:

    private void UpdateResults()
    {
        Invoke(new MethodInvoker(
                       delegate
                       {
                           this.dgvResults.SuspendLayout();
                           this.dgvResults.DataSource = null;
                           this.dgvResults.DataSource = this._mySource;
                           this.dgvResults.ResumeLayout();
                           this.dgvResults.Refresh();
                       }
                       ));
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:06:12+00:00Added an answer on June 9, 2026 at 6:06 pm

    At run time, you can just specify the column as being invisible:

    dgv.Columns["ColumnName"].Visible = false;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a DataGridView that I'm trying to populate using a For loop: Dim
I'm trying to populate a smartgwt calendar using data form a server obtained using
I am using ASP.NET MVC 3. I am trying to populate my YUI data
I am trying to populate data in DataGridView control. It gets populated into it.
I'm trying to populate a DataGridView on my WinForms application ( dgvOrderSizes ) using
I am using currently the following code to populate a combobox: combobox.DataSource = datatable;
I'm using a DropDownList with a data source which successfully populates the list. However,
When you update DataGridView.DataSource using the assignment operator, the DataSourceChanged event handler is called.
Is it possible to bind/rebind a RadListView's datasource using Ajax? What I'm trying to
I am trying to do efficient paging with a gridview without using a datasource

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.