Click here to Skip to main content
15,887,083 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
void BtnShowDataClick(object sender, EventArgs e)
		{
			//display data
			DataTable d1 = new DataTable();
			//add column header
			d1.Columns.Add("id");
			d1.Columns.Add("name");
			d1.Columns.Add("qty");
			d1.Columns.Add("price");
			d1.Columns.Add("product_group");
			//add mockup data
			d1.Rows.Add(new object[] {001,"pd1",50,100,"group1"});
			d1.Rows.Add(new object[] {002,"pd2",150,200,"group1"});
			d1.Rows.Add(new object[] {003,"pd3",250,300,"group2"});
			d1.Rows.Add(new object[] {004,"pd4",200,400,"group2"});
			d1.Rows.Add(new object[] {005,"pd5",300,500,"group3"});
		    d1.Rows.Add(new object[] {006,"pd6",95,600,"group3"});
		    
		    dataGridView1.DataSource = d1;
		    
		}


What I have tried:

How can I filter a group of this data
Posted
Updated 10-Oct-20 21:20pm
Comments
OriginalGriff 11-Oct-20 3:19am    
You are going to have to be much more explicit about exactly what you are trying to do: remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
What are you trying to display? When are you filtering it? What kind of filtering are you trying for - display or source? What do you expect to see?

Use the "Improve question" widget to edit your question and provide better information.

1 solution

Filter: Give specific examples of what you want to do.

Look at the list of related questions on the right side of this page: start by exploring those resources; then try writing code; come back here with your code and specific questions and/or problems and error messages.

Related Questions

how filter data in datagridview
want to filter datagridview
Filter datagridview columns
Filtering DataGridView based on DropDowns
How Do I Filter Data By Date In Datagridview
Filter listbox data by using datagridview cell
Filter data in datagridview by using a textbox in VB.NET
Filter datagridview rows based on textbox data
How I filter data from datagridview using another datagridview
DataGridView Row Filtering Without a loop?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900