Jassimi
asked on
Find Total amount of one column in Datagrid and put it in textbox
hi..
I have a datagrid(DataGridView1) that have some columns from dataset,
the last column is(price). I want to find the total amount of this column(price) and put it in the textbox.
how can I fix that
Thanks
I have a datagrid(DataGridView1) that have some columns from dataset,
the last column is(price). I want to find the total amount of this column(price) and put it in the textbox.
how can I fix that
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
not this what I want
I want to calculate the total amount of the price column which is in datagrid in textbox
I want to calculate the total amount of the price column which is in datagrid in textbox
Jassimi:
where should I write this code?
is it in same textbox?
-where should I write this code?
I assume you a have a button that would trigger the calculation event. And the code provided you should be in that code block.
-is it in same textbox?
Probably yes? That was just an example if your using other TextBox name then set to the respective textbox!
maybe you can submit you partial code and feed me more of what your trying to do: :-)
where should I write this code?
is it in same textbox?
-where should I write this code?
I assume you a have a button that would trigger the calculation event. And the code provided you should be in that code block.
-is it in same textbox?
Probably yes? That was just an example if your using other TextBox name then set to the respective textbox!
maybe you can submit you partial code and feed me more of what your trying to do: :-)
ASKER
sorry for late,
I don't have a button to calculate the event,
I put a textbox under the datagridview to calculate the total amount of the price column,
when I tried your code, it doesn't do that, it just calculate the rows of the datagrid
I don't have a button to calculate the event,
I put a textbox under the datagridview to calculate the total amount of the price column,
when I tried your code, it doesn't do that, it just calculate the rows of the datagrid
ASKER
ok..
its working now but by temptable
not by original database source
thanks
its working now but by temptable
not by original database source
thanks
ASKER
is it in same textbox?