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
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