I have grid where each cell represents some quantity of different widgets. I would like the user to be able to press on button and switch from the quantity of the widget to its value. So, for example, widget1 is worth $5 a piece and widget2 is $6 a piece
Qty based display
widget1 1 2 3
widget2 5 10 15
Corresponding $ based display
widget1 $5 $10 $15
widget2 $30 $60 $90
This $-based grid is not editable since it is derived from the qty based information. But the qty-based grid is editable and how the information would be held in the datatable.
Since this $-based information is not editable, I am hoping I do not have to generate another datatable to hold these derived numbers. What are my options?
Thanks!
Yeah I figured that, Don't change your value change your text with the updated cacluation I do it all the time... For that matter I do it on the webgrid to look at the demo challenge we are doing right now http://outlook.visualstudiotutorials.com and you will notice that the images like read, attachment etc. that is just the display text the "value" is 0, 1 on those cells. you can do the same thing in the wingrid
The qty values are very important to maintain because a number of other calculations are tied to the qty values. If I were to do the x*y, the underlying table column value would also change (since the grid is bound to a table). Do so would ruin some of calculation which rely on that table holding qtys and not $ amounts.
I am hoping to get away with some "for the eyes only" kind of solution which would not mess with my underlying table field values. Thanks anyway!
So I am still awaiting for any suggestions?
I would just change the value of the cell (onclick) to the new x*y value and slam a $ in front of it (and reverse the process to switch it back), but I am pretty lazy :)