smart way to store data

falled

Member
Joined
Sep 16, 2006
Messages
20
Programming Experience
Beginner
Hi everyone!

I've got a question for you, but I will describe my app before.

I've got a tabControl where I create an indeterminate number of tabs, every tab I create contains a splitcontainer, divided horizontally. On the top I've got a listview and a datagrid on the bottom. Every time I select an element from the listview I wanna show the information in the datagrid, id, name, prize, etc... The elements of the listview are mechanical pieces, and I want to store material, weight, etc... And every tab is a set of pieces that I can sell so I can have many sets of many pieces

Witch is the best way to store data?????????
 
I believe what you describe can be accomplished with a single datatable.. each row would contain the Piece name (which will go in the listview) and the weight, size etc
The DataGridView will show the weight, size etc. Both listview and DGV are bound through the same bindingsource. Selecting an item in the list view will move the selected row in the DGV

Each tab could have its own datatable..

There is scope within this for one or more master detail relationships but it depends how you wish the data to be shown and the relationship between piece name and the rest of the parameters. If for example the Piece name is "Bolt" then there are many sizes etc, and it makes sense to implement a master-detail relationship. If the piece name is "M10x60 heavy duty wall bolt" then it probably isnt a group of bolts but a specific bolt..
 
Back
Top