Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datagrid using javascript to total up

Status
Not open for further replies.

vituja123

Programmer
Jun 16, 2005
110
0
0
US
Hi All,

I have a data grid with a few columns. The first column is a checkbox template and the last column holds numeric values.

When the user clicks the checkbox, I need to add up all the rows with the checkboxes checked and place that sum in textbox on the screen.

On the checkbox I have placed code:
Dim JScriptValue1 As String
JScriptValue1 = ("alert('test');")
recpt.Attributes.Add("onClick", JScriptValue1)
---------------
Now I need javascript code to sum up all the checkbox interger values. Is there an easy way to do this?
 
Is the column that holds the numeric value a template column?

Jim
 
yes. I tried may different ways but alas, when I press a button to update the checked data, all the checkboxes are identified as checked. The button does a postbox clearing out the checkbox values.

Guess I'm going to use a database field to keep track of their values and abandon the javascript idea.

Thanks anyway for responding Jim.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top