Link to home
Start Free TrialLog in
Avatar of kwcowboy1226
kwcowboy1226

asked on

Calculate a total for values in a dropdownlist in a gridview


Row Number        District Locations

1                                       HE

2                                     RLE

3                                       :RE

4                                        JE

5                                       SE

In a gridview the alpha values come from a dropdownlist.

With a combimination of Row 1 and 2,  2 and 3, and 3 and 4, and 4 and 5.  A SQL select will be done to find a numeric value for the combos and add them together for a total.  This code must have more than one row to make the Database call for the numeric value..  Please provide the code to do this task.  
ASKER CERTIFIED SOLUTION
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kwcowboy1226
kwcowboy1226

ASKER

I am very sorry guys, just wanted a starting place.
Start with using the Items collection of the dropdownlist after it has been bound.  The ListItem's Value property can be sent to your database query to get the value within a loop.

Along with AndyAinscow, any further advise or snippets (examples not complete code) should be in another question.  From your comment, I assume miscomunications.