Newbie problem - Changing Gridview field value (i.e. calculate a value) before clicking update VS2

A

AAJ

Hi All

I have a problem and wonder if any one can help

I have a strongly typed dataset looking at a sqlServer

I have a class that forms my BLL that manages this dataset

I have a datagrid on the UI

I can edit a record. Within the edit template of the record I have a
dropdown that is bound to the main dataset. When I click update, the
datasource/database/UI are updated correctly via my BLL.

This is where my problem is.

The drop down holds data about work cost i.e.
1 = Workcost 1
2 = Workcost 2
3 = Workcost 3 etc...

There are other fields in the Gridview, in particular one called Quantity
and one called Total.

In windows forms, it is easy for me to catch an event on the combo box, and
calculate the total depending on what is selected i.e. Total = QTY *
Workcost, but not write to the database

What I can't figure out how to do is do this on a web page, within the
'editing' of the Gridview. The calculated value just needs to be fleeting,
as the drop down or Quantity changes, the screen recalculates (nothing
wiriiten) as soon as update is clicked, no problem, my business logic can
deal with the calculations and update the source as required

So in summary, In edit mode on the gridview, on change of workrate or
quantity, update the gridview to show the temp calculated values (but not
update the database), and when update is pressed, The business logic will re
calculate and update the database.

If anyone knows how to do this it would be really usefull.

TIA and best regards

Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top