简体   繁体   中英

DataGridView to show calculated values from 3 other datagridview

I really need some help in this one

I have 3 tables - First one is tblReceive with columns size1R , size2R, .... ,size9R second one is tblDispatch with columns size1D, size2D,.... , size9D and third one is tblBroken with columns size1B, size2B, .... size9B

now i want a dataGridView to show size1, size2, .... size9 but the values should be size1R - size1D - size1B , size2R - size2D - size2B and so on.

I want to know the best practice to perform such task

I have 3 dataGridView in my form. one to add data to tblReceive and second to add data to tblDispatch and third to add data to tblBroken. How do I get the data from each table and put it in a variables so that i can do the calculation

Thanks Heaps

Have you heard about: SelectedValue,SelectedValuePath and DisplayMemberPath ? They might give you a nudge in the right direction. (Fair disclosure: I wrote that article :).

Another option would be to weave some linq to get the objects you want, but you'll have to provide an example of what you have and what you expect in order to get more help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM