Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a DataBound DataGridView on a form that ties into our company's records of all employees, both past and present.

 

We want the DataGridView to include all of the employees, but also include the ability to view only active or only past employees.

 

I have tried hiding individual rows like so:

DataGridView1.Rows[i].Visible = false; // C# syntax

But, the compiler will not allow this.

 

Does anyone have any other ideas? Can this be done with a DataBound DataGridView?

Posted
Are you binding the datagridview directly to a dataset / datatable? If so you might want to look at using a dataview and binding to that, then you could set a filter on the dataview.

I understand, and I got it working.

 

I added a new FillBy clause to my TableAdapter, and refilled my DataGridView.

 

Thanks!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...