Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Do a Calculated Column?
Message
From
23/01/2007 07:42:15
James Hansen
Canyon Country Consulting
Flagstaff, Arizona, United States
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01187444
Message ID:
01188038
Views:
18
Kevin,

What I want is for the user to be able to see the updated value of the speed as soon as the user changes either the distance or the time on the form, before the record gets saved to the backend. (This would be similar to calculating the line item extended price by multiplying the item price by quantity the in an order.) Obviously the value of the calculated column per se cannot be saved. It should be calculated on the fly. I've tried calling Refresh() on the speed Textbox from the Validated events for the distance and time Textboxes, but it doesn't refresh. It still shows the old speed.

...Jim

>Jim,
>
>>I have a table with distance and time and wanted to add a "calculated column" to figure the speed dynamically on forms and in calculations, but haven't found a good way to do it.
>>
>>First shot was adding the calculated column to the SQL retreival command in the BO, but that never got updated, even after saving a record.
>>
>>Next I tried adding an "expression column" to the dataset in in the HookPostGetData method of the BO. That got updated when I saved the data, but not before. The displayed value on the form and the value used in expressions in the code did not change until I saved the record.
>>
>>I tried adding a property to the business entity object, but then I couldn't bind a control to it.
>>
>>Any suggestions for how to get this to work without saving the record?
>
>I'm unsure of the behavior you want from the calculated column. What do you mean when you say the column is getting "updated"? Do you mean persisted to the back end?
>
>Best Regards,
Previous
Reply
Map
View

Click here to load this message in the networking platform