Customizing the DataGridView

joe_pool_is

Well-known member
Joined
Jan 18, 2004
Messages
451
Location
Texas
I have a DataBound DataGridView on a form that ties into our companys 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:
Code:
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?
 
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.
 
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!
 
Back
Top