how to create receipt from content of datagridview

atmir

New member
Joined
Mar 8, 2011
Messages
1
Programming Experience
Beginner
hello! i need hel to creat receipt from datagrid content but i dont know how to start
plz can anybody help me
thnx
 
You probably don't know where to start because you are treating two unrelated issues as one. You don't go straight from a field of wheat to a loaf of bread. Farming the wheat, turning it into flour and then baking bread from that flower are all independent operations. Likewise, getting data from a DataGridView and printing (I assume that's what you're doing) a receipt are two unrelated operations. You get data from a DataGridView the same way no matter what you're going to do with it. Likewise, you print the same way no matter where the data comes from.

So, look at those two operations independently. Forget about the printing to begin with and just get the data from the grid and display it in MessageBoxes or the like. Once you've done that you can think of that as a black box with a pipe coming out that contains the data. Next, forget about the grid and just play around with printing some canned data. Once that's done you have another black box with a pipe going in that accepts the data. Now you've simply got to join the pipes together and you're done.

That type of process is known as "divide and conquer". Break a problem down into its constituent parts. Solve each small problem in isolation and, when you're done, joining all the solutions together inherently solves the original problem.
 
Back
Top