Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Add tooltip capability at table cell level to control for asp.net 2.0 page

Posted on 2006-11-24
8
Medium Priority
?
3,105 Views
Last Modified: 2008-01-09
Hi Experts,
     I need to amend a class module which shows a calendar view of a schedule with ranges of dates held, for booked courses, in database shown in red. The control generates a table cell for each day. I need to show a tooltip whenever the mouse is over any of the cells for a course booking showing the course name and a delegate list. At present there is a course name attribute for the cell. How can I go about this?
0
Comment
Question by:JamesJMcDonnell
  • 4
  • 4
8 Comments
 
LVL 11

Expert Comment

by:ethoths
ID: 18008045
There is a tool tip property on the table cell. Can you not simply set the value on this?

        Dim a As New TableCell
        a.ToolTip = "Help Me"
0
 

Author Comment

by:JamesJMcDonnell
ID: 18008238
ethos,

The table cells are declared as HTMLTableCells and don't have a tool tip property but have innerHTML and innerText properties. Can I use one of these and/or is it better to convert the HTMLCell, HTMLRow and HTMLTable elements to Cell, Row and Table respectively?

James
0
 
LVL 11

Expert Comment

by:ethoths
ID: 18008373
No, just use the title attribute...

<td title="Help Me">My Content Here </td>
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:JamesJMcDonnell
ID: 18008466
The HTMLTableCell itself has no title attribute
0
 
LVL 11

Expert Comment

by:ethoths
ID: 18018012
Then either code it declarativley or use a custom attribute...

myHTMLTableCell.attributes.add("title","Help Me")
0
 

Author Comment

by:JamesJMcDonnell
ID: 18018492
Good, but I want to add specific title content, dynamically, at runtime.
So I've added your code into the following statement:

if (SelectedDates.isSelectedDate(Caldate))
                {
                    TblCell.Attributes.Add("title", "help me");
                    TblCell.BgColor = "RED";
                }
in the class module.

In the code behind for a particular page using the control I have:

Private Sub BindScheduleInfo()
        Dim ds As DataSet
        ds = Commerce.Common.BookingCourseCollection.GetBookingSchedulebyCustomerID(Profile.customerID)
        Dim row As DataRow
        For Each row In ds.Tables(0).Rows
            If Not IsDBNull(row("ScheduleDateFrom")) And Not IsDBNull(row("ScheduleDateTo")) Then
                CourseSchedule.SelectedDates.AddRange(row("ScheduleDateFrom"), row("ScheduleDateTo"), row("CourseName"))
            End If
        Next
    End Sub
and this makes the cells ,which represent days, red for days that fall in range of course dates.
How can I apply the database values to the cells text attribute values?
0
 
LVL 11

Accepted Solution

by:
ethoths earned 1500 total points
ID: 18018568
Add a property to the class module to accept the phrase you want to display. Call this from your page logice to set it's value to the phrase you want to display. Then in the code behind, rather than usnig "help me" just use the property that was previously set.

0
 

Author Comment

by:JamesJMcDonnell
ID: 18021347
In class module have added:

public string ToolTipText
        {
            get
            {
                return m_tooltiptext;
            }
            set
            {
                m_tooltiptext = value;
            }
        }

Now I don't know how to call from page logic, if not code behind then do you mean in javascript on html page?
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month21 days, 3 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question