S
shapper
Hello,
I need to get the value of a Gridfiew field named "Channel" which is
the first column of the Gridview.
I want to use that value to build the ToolTip of an image. How can I do
this?
Here is my code:
Private Sub gvRSSChannels_RowDataBound(ByVal src As Object, ByVal e
As GridViewRowEventArgs) Handles gvRSSChannels.RowDataBound
' Bind row elements
If e.Row.RowType = DataControlRowType.DataRow Then
' Define row view
Dim rvRSSChannels As DataRowView = CType(e.Row.DataItem,
DataRowView)
' Define channel data column
Dim channel As String = rvRSSChannels("Channel").ToString
' Define cells collection
Dim tccRSSChannels As TableCellCollection = e.Row.Cells
' Define hfIcon hyperlink
Dim hfIcon As HyperLink =
CType(tccRSSChannels(tccRSSChannels.Count - 3).Controls(0), HyperLink)
hfIcon.ImageUrl =
Me.GetLocalResourceObject("hfIcon.ImageUrl").ToString()
hfIcon.ToolTip = Me.GetGlobalResourceObject("RSS", "{0}_Title")
' ******
End If
End Sub
See, where I have *****: "{0}_Title"
I thought {0} would work but it is not working.
Could somebody tell me why?
Thanks,
Miguel
I need to get the value of a Gridfiew field named "Channel" which is
the first column of the Gridview.
I want to use that value to build the ToolTip of an image. How can I do
this?
Here is my code:
Private Sub gvRSSChannels_RowDataBound(ByVal src As Object, ByVal e
As GridViewRowEventArgs) Handles gvRSSChannels.RowDataBound
' Bind row elements
If e.Row.RowType = DataControlRowType.DataRow Then
' Define row view
Dim rvRSSChannels As DataRowView = CType(e.Row.DataItem,
DataRowView)
' Define channel data column
Dim channel As String = rvRSSChannels("Channel").ToString
' Define cells collection
Dim tccRSSChannels As TableCellCollection = e.Row.Cells
' Define hfIcon hyperlink
Dim hfIcon As HyperLink =
CType(tccRSSChannels(tccRSSChannels.Count - 3).Controls(0), HyperLink)
hfIcon.ImageUrl =
Me.GetLocalResourceObject("hfIcon.ImageUrl").ToString()
hfIcon.ToolTip = Me.GetGlobalResourceObject("RSS", "{0}_Title")
' ******
End If
End Sub
See, where I have *****: "{0}_Title"
I thought {0} would work but it is not working.
Could somebody tell me why?
Thanks,
Miguel