Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Newbie problem - Changing Gridview field value (i.e. calculate a value) before clicking update VS2005 ASPX

Reply
Thread Tools

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

 
 
AAJ
Guest
Posts: n/a
 
      09-06-2006
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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript validation for a not required field, field is onlyrequired if another field has a value jr Javascript 3 07-08-2010 10:33 AM
Copy File Field Value to Dynamic File Field Value VUNETdotUS Javascript 25 11-10-2007 10:36 AM
Calculate field based on another field in form jochen scheire Javascript 6 04-22-2004 01:47 PM
calculate value on exit field jochen scheire ASP General 1 04-21-2004 08:07 AM
required field validator - before changing the value. Mr. x ASP .Net 0 11-30-2003 08:32 PM



Advertisments