I am currently creating a web app for a sports club, I have a Gridview containing a list of club honours. One of the fields is the season the honour was achieved, the Gridview has buttons to edit the individual rows.
The problem I am having is that I need, on edit to apply a drop list to the season field so this value can be changed, which will contain a list of years ranging from 1960 to current year. I have applied this drop list correctly to the form and am fine with generating the values.
I am just not to sure how to achieve this in the Gridview, which event of the GV do I use...?
How do I get the correct row index that is being edited?
The code I am using to generate the Drop List on the form is
Dim currentSeason As Date = Now()
Dim currentSeasonYear As Integer
currentSeasonYear = currentSeason.Year
For i As Integer = currentSeasonYear To 1970 Step -1
In summary I need to be able to apply this code to a drop list in a Grid View when a row is edited