|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
vb - calculations using datagrid
I've just realised I can't implement what I'm trying to do using VB and the Datagrid control but I don't know which way to turn please help.
Basically I need 2 textboxes where the user can enter details. One of these is then used in a "function" to retrieve data from mssql. The second textbox should then be used to perform a numerical calculation on the dataset(ie. 100000 * 0.45) The 100000 is from the textbox and the 0.45 is from one of the row is mssql. There could be 10 row or more and not all with a value of 0.45. Initially I was hoping to use the datgrid with an unbound column so that the results of the calculation could be returned in the column for each row. However this doesn't appear to be possible. The final result would look something like this: Rate Results 0.45 45000 0.50 50000 0.95 95000 etc... Can anybody point me in the right direction |
|
#2
|
|||
|
|||
|
I don't understand where the datagrid enters in this picture. Post some of the code that's giving you a problem.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
||||
|
||||
|
One Solution might be to add another column to your dataset table that will hold the calculated value. Then when your dataset is updated you can catch it in the row_changed event or column_changed event of the table then rebind your datagrid.
|
|
#4
|
|||
|
|||
|
yes Doug i dont understand why swanagetown needs a datagrid here
u can take textbox or any other control when u want to update the data in the table whose data is populated in teh datagrid. Kindly Post specific code and mistake u wish to clarify Sony |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > vb - calculations using datagrid |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|