Click here to Skip to main content
14,574,881 members
Rate this:
Please Sign up or sign in to vote.
I am looking for a way to filter a Datagridview to another Datagridview and by using a reference number in the first column and searching for a sum of the values of this reference number in another column

Datagridview 1

For datagridview 1 in doesn't have any data table or database just get data from some text boxes


What I have tried:

can someone help me..? thanks.

sorry for my bad english.
Posted
Updated 30-May-20 23:57pm

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

You could apply these steps:

  • Read the value in the first column of the first datagrid.
  • Use this value to build a (parameterized) query, selecting the data relevant to the value obtained in first step.
  • Bind the result of the query to the second datagrid.
   
Comments
colanlog 31-May-20 6:51am
   
i didn't understand can you explain more please.?? am just beginner in programming
phil.o 31-May-20 7:41am
   
Well, explaining all of it may take quite an amount of time, and goes far beyond the purpose of a quick answers forum. If you could use the green "Improve Question" button, and qualify your question with the relevant part of the code that you have so far, then it would be easier to provide a concrete solution.
If you really are a total beginner, I would advise to put your current project on hold, and invest some time in learning the basics of the language first. It wouldn't be a waste of time, but instead will make your learning curve much smoother, in the long term.

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100