How do I set the text of the tooltip in a gridview row at runtime?

I have a gridview and the 2nd column is a template with a single asp:Imagebutton control in it (see code snippet #1). I want to set the text for the tooltip on a row-by-row basis in the VB code at runtime based on the text of 2 other columns in the gridview (see code snippet #2). This is not working and shows .tooltip as not a member of System.Web.UI.Control in VWD 2005. My question is twofold: 1) Can I set the tootip for the image to a different value for each row? and 2) How do I do it?
(snippet #1)
<asp:TemplateField HeaderText="R">
                    <ItemTemplate>
                        <center>
                            <asp:ImageButton ID="ibtnShowRetail" ImageUrl="/ugwImages/button-exclamation.gif"
                                runat="server" ToolTip="Put Retail $ in Here!" />
                        </center>
                    </ItemTemplate>
                </asp:TemplateField>
 
(Snippet #2)
Protected Sub gvSearchResults_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvSearchResults.RowDataBound
    If e.Row.RowType = DataControlRowType.DataRow Then
        e.Row.Cells(2).Controls(1).ToolTip = "Resell 1: " & e.Row.Cells(7).Text & " Resell 2: " & e.Row.Cells(8).Text
    End If
End Sub

Open in new window

ovcbsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ovcbsAuthor Commented:
I managed to get at the tooltip:

Protected Sub gvSearchResults_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvSearchResults.RowDataBound
        Dim MyControl As System.Web.UI.Control
        Dim MyImageButton As ImageButton
        If e.Row.RowType = DataControlRowType.DataRow Then
            MyControl = e.Row.FindControl("ibtnShowRetail")
            MyImageButton = MyControl
            MyImageButton.ToolTip = "Resell 1: " & e.Row.Cells(7).Text & " Resell 2: " & e.Row.Cells(8).Text
         End If
    End Sub

But the tooltip just shows "Resell1: Resell 2:" Without any data from the other cells.
0
ovcbsAuthor Commented:
I found the solution myself. By creating 2 variables for the text boxes I was trying to access and using the FindControl method to place them into these variables I was able to access them the same way I accessed the image button.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.