[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

ASP.Net + Extending ToolTip display time?

Posted on 2009-05-04
10
Medium Priority
?
1,296 Views
Last Modified: 2012-05-06
I have a OnRowDataBound that I set the row.tooltip to a value.  I need to increase the display time.  I do not see any options for this when doing a tooltip.

Anyway I can do this?

Code below.

protected void EDIJobData_OnRowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                string listaccts = DataBinder.Eval(e.Row.DataItem, "listaccts").ToString();
 
                string[] stringColl = listaccts.Split(new char[] { ',' });
 
                int count = 0;
 
                listaccts = string.Empty;
 
                foreach (string aString in stringColl)
                {
                  if (count == 4){
                      listaccts += "\r\n";
                       count = 0;
                }
                listaccts += " " + aString;
                count++;
                }
 
                e.Row.ToolTip = listaccts;
            }
        }

Open in new window

0
Comment
Question by:sbornstein2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 39

Accepted Solution

by:
abel earned 2000 total points
ID: 24294502
A tooltip is something build-in to the browser and the html element you assign it to. If you want to display it longer, you need to create your own tooltips. There are several sites that offer these for download and they are usually created with a javascript call.

Very nice one:  http://www.dhtmlgoodies.com/index.html?showDownload=true&whichScript=tooltip_shadow

Simple one:  http://www.dhtmlgoodies.com/scripts/form-field-tooltip/form-field-tooltip.html

and there are many others. Just ask if you need some other types.
0
 
LVL 4

Expert Comment

by:cauos
ID: 24294530
0
 

Author Comment

by:sbornstein2
ID: 24294685
i need to assing the tooltip through my code though and on the onrowdatabound nothing in the ASPX page itself?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:sbornstein2
ID: 24294692
it is in a gridview so it has to be dynamic to the row.
0
 
LVL 39

Expert Comment

by:abel
ID: 24294857
The links above are either for winforms applications (cauos solution) or for asp.net web applications (my solution). You can use either of the solutions dynamically. The first link I mentioned above has a demo page: http://www.dhtmlgoodies.com/scripts/tooltip_shadow/tooltip_shadow.html, if that works a bit the way you want it (you can set the tooltip close function upon a timer, if you want, or just keep it the way it is) I, or some other expert can help you with implementing that in your solution.
0
 

Author Closing Comment

by:sbornstein2
ID: 31577511
this should work and call in the rowdatabound.  Thanks
0
 

Author Comment

by:sbornstein2
ID: 24295050
here is the issue though.  You see the line break I do after every 4 accounts, this gets messed up and unterminated string constant on the line break as I see in the source code the spacing throws it off.  I have to do this though to make sure the width of the tooltip stays a certain width otherwise it goes way off the page.
0
 
LVL 39

Expert Comment

by:abel
ID: 24295187
(from grading comment): "this should work and call in the rowdatabound.  Thanks"
(from last comment): "I have to do this though to make sure the width of the tooltip stays a certain width otherwise it goes way off the page."

not sure if you mean with this that you have found a way, or that you are still struggling with it. The tooltips can be given a certain width or height through CSS, depending on which tooltip solution you went for in the end.
0
 

Author Comment

by:sbornstein2
ID: 24295403
hey it is okay, I am now also using a double click alert event on the row which works fine if they want to keep it up.  Thanks
0
 
LVL 39

Expert Comment

by:abel
ID: 24295614
nice! glad it works :)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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.…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

656 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