Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlink tooltip dont show up 1

Status
Not open for further replies.

compu66

Programmer
Dec 19, 2007
71
US
Hi,



Here is my code

For Each Task As ExamTask In Tasks(AccNum)
Dim lnkTask As New HyperLink

lnkTask.ID = "lnkTask_" + Task.ExamTasksID.ToString()

lnkTask.ImageUrl = Task.ImageURL
lnkTask.NavigateUrl = "Javascript:window.showModalDialog('../Reports/AddExamTask.aspx?acc=" & AccNum.ToString & "&tid=" & Task.ExamTasksID & "','ExamTasks','dialogWidth=700 px,dialogHeight=600 px,scrollbars=yes,resizable=no');document.forms(0).submit();"

lnkTask.ToolTip = String.Join(" | ", Task.Comments.ToArray())

Item.Cells(ColumnIndex).Controls.Add(lnkTask)

Next

Here the tooltip dont show up.Not able to figure out the reason.

Thanks for any ideas and help in advance.

 
not sure why the tooltips aren't showing up, but you could add a repeater to the cell and bind the list of tasks to the cell, instead of the current method.
Code:
<asp:repeater id="repeater" runat="server">
  <itemtemplate>
      <asp:ImageLink 
           id="link" 
           runat="server" 
           ImageUrl='<%# eval(ImageUrl)%>' 
           NavigateUrl='<%#Javascript:window.showModalDialog('../Reports/AddExamTask.aspx?acc=" & AccNum & "&tid=" & eval("ExamTasksID")& "','ExamTasks','dialogWidth=700 px,dialogHeight=600 px,scrollbars=yes,resizable=no');document.forms(0).submit();%>' 
           ToolTip='<%# string.Join(" | ", ((List<string>)eval("Comments")).ToArray())%>' />
  </itemtemplate>
</asp:repeater>
Code:
Repeater repeater = (Repeater)Item.FindControl("repeater");
repeater.DataSource = Tasks(AccNum);
repeater.DataBind();
note: you will need a protected Readonly property to access AccNum for the navigate url

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top