View Single Post
  #4 (permalink)  
Old August 26th, 2011, 09:55 PM
aspless aspless is offline
Friend of Wrox
Points: 489, Level: 7
Points: 489, Level: 7 Points: 489, Level: 7 Points: 489, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2006
Location: Berkshire, United Kingdom.
Posts: 104
Thanks: 9
Thanked 1 Time in 1 Post
Default

Making progress and just need to get the index working properly

Any nudge?

Code:
Dim dvAccess AsDataView = DirectCast(SqlDataSource1.[Select](DataSourceSelectArguments.Empty), DataView)
Dim index AsInteger'= GridView1.SelectedIndex
index = 0
ForEach rowView AsDataRowViewIn dvAccess
'Create(index)
If index = 0 Then
index = 1
Else
index = index + 1
EndIf
Dim row AsDataRow = rowView.Row ' Do something '
Label1.Text = row(4)
If row(4) = 1 Then
Dim ImgButGridGroup AsImageButton = CType(GridView1.Rows(index).FindControl("ImgButGridGroup"), ImageButton)
ImgButGridGroup.ImageUrl = "~/images/icons/gridmembers.jpg"
Else
Dim ImgButGridGroup AsImageButton = CType(GridView1.Rows(index).FindControl("ImgButGridGroup"), ImageButton)
ImgButGridGroup.ImageUrl = "~/images/background/1pxWhiteSpace.jpg"
EndIf
 
Next
Reply With Quote