473,387 Members | 3,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

DataGridViewRow Alternate Text

I want to add alternate text like on an html image to a
DataGridViewRow. Is it possible?

Jul 10 '07 #1
6 1712
It is definitely possible. It just depends on how everything is setup. Can
you post some code?

<do*********@gmail.comwrote in message
news:11*********************@w3g2000hsg.googlegrou ps.com...
>I want to add alternate text like on an html image to a
DataGridViewRow. Is it possible?
Jul 10 '07 #2
On Jul 10, 12:38 pm, "Jeremy Ames" <anonym...@whereever.comwrote:
It is definitely possible. It just depends on how everything is setup. Can
you post some code?

<doomsday...@gmail.comwrote in message

news:11*********************@w3g2000hsg.googlegrou ps.com...
I want to add alternate text like on an html image to a
DataGridViewRow. Is it possible?
Im just binding a data table to the grid. I think i need to use the
ControlAdded event of the grid to catch all the rows being added but I
dont know how to add the mouseover text to the control.

Jul 10 '07 #3
Anyone know how I can get the mouseover text on the DataGridViewRows?

Jul 12 '07 #4
<do*********@gmail.comwrote in message
news:11**********************@w3g2000hsg.googlegro ups.com...
Anyone know how I can get the mouseover text on the DataGridViewRows?
Not sure precisely what you're trying to do - when you move the mouse over
the rows, what are you expecting to happen, exactly...?

However, the following might give you a push in the right direction:

<asp:GridView ID="MyGridView" runat="server"
OnRowDataBound="MyGridView_RowDataBound" .......>
........
</asp:GridView

protected void MyGridView_RowDataBound(object sender, GridViewRowEventArgs
e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover",
"this.style.backgroundColor=\"black\"");
}
}

I'm sure you can adapt it for your specific requirements...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jul 12 '07 #5
I figured out how to get what I wanted. It is the tooltip that i want
and you cant put it on a row but you can put it on cells within that
row so i just loop through all the cells of that row and set the
tooltip to the same thing on each cell so it seems like the entire row
was the tooltip.

Jul 12 '07 #6
<do*********@gmail.comwrote in message
news:11**********************@n60g2000hse.googlegr oups.com...
>I figured out how to get what I wanted. It is the tooltip that i want
and you cant put it on a row but you can put it on cells within that
row so i just loop through all the cells of that row and set the
tooltip to the same thing on each cell so it seems like the entire row
was the tooltip.
Ah right. The thing to remember here is that a GridView is rendered as an
HTML table so the rows are <trand the cells are <td>...

Glad you got it sorted...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jul 12 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Toby A Inkster | last post by:
www.authoring.stylesheets] For ages I have provided links to alternate stylesheets from my pages as per W3C recommendations: <link rel="stylesheet" href="baz" type="text/css" title="Baz"...
5
by: User | last post by:
If I want to provide alternate stylesheets (eg red.css, green.css), is it better to put all the stuff that is common to both sheets in a separate css file (eg basic.css) and use @import at the top...
10
by: Jarson | last post by:
I am using the ACRONYM tag to provide an explanation of codes within my application. Example: <p>The circuit <acronym title="Circuit P123T: Picton SS to Telebary SS 345KV">P123T</acronym> is...
4
by: sconeek | last post by:
Hi all, I am generating a html based table with multiple rows of data coming in real time from a postgres DB. The underlying technology is java based however the front end is html. now i am...
1
by: Eric Lindsay | last post by:
I am trying to understand the differences between and uses of persistent, default and alternate styles. I have read http://www.w3.org/TR/REC-html40/present/styles.html section 14.3.2 on...
5
by: dpomt | last post by:
When the ASP.NET menu is rendered on downlevel browers, the text "^ up one level" is displayed. Any ideas how I can change that text? I did not find a property for the menu control where I can...
1
by: Robert Bravery | last post by:
HI All, I'm trying to loop through a datagridview, and use values found in various columns. But problem is that I get errors newar the end. I'm assuming that it is reading the blank row at the...
5
by: Michael R | last post by:
Searching the net I've found a simple technique to add row numbers and alternate colors (for the even and the uneven row) to a continuous form. 1st step: Create a textbox, send it to background...
9
by: johkar | last post by:
I need some browser implementation clarification. In the below example, the alternate stylesheet could be invoked by user agents that support alternate stylesheets or by script. Are there any...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.