<i><font color="#663300"><i><font color="#663300">I have done this using 2 textboxes in a single column. One is visible and one is not so the invisible one shows the calculated value for acceptance and the visible one holds the view value. (I think that is the right way round) When you display the new calculation for acceptance switch the visible/nonvisible around for that column/row only. I have done this using a cifcombobox and textbox in the one column to allow dynamic entry but without the overhead of loading the comboboxes for all the rows at startup. So the only time the combobox is visible is when you enter that grid box. It takes a bit of fiddling and needs a call back to a method in the grid or its parent container but it works well.
</font></i>Hey Graeme, Thank you for the reponse. I have read many of your responses over the past year, which have been a great help to me (as well as this Forum in general). I have learned a great deal, and have grown in my appreciation of this framework and of all the help given to those of us getting used to using this framework. But, I am a little unsure about how to do what you propose. The first problem I have is actually displaying a calculated value in a grid cell/column, without doing it in a view. I cannot put the calculation in the ControlSource, because it is not a variable. I cannot set the ControlSource of the column (or the textboxes individually) to an array of calculated values (even when it is calculated on the fly or in the form init). This, of course, is my main dilemma. The second problem I have is changing the atrtributes of a particular cell in the grid. How can one address a cell like that? Is it the Visible property of the text box that is being changed or the CurrentControl of the column, or both? Which leads to my third problem, which is how to have multiple controls being used within the same column?
</font></i>Nevermind, the answer was just too easy for me. All I had to do was to put a little REPLACE statement in the LostFocus() event of the unit_price and quantity text boxes and the dataentry grid now works perfectly. I also have a call to a total textbox's refresh() that resides on the form that recalculates its own value which is the total of the extension field from the parameterized view of the grid. I really should start to try and be simple first and move towards the complex as I hit walls. =)
Devman mdevlin .at. ajdebruin DO.T com
©2001 Mike Devlin |