Solved

Changing Background color and borders ASP.Net DataGrid's ToolTip

Posted on 2007-03-29
3
1,341 Views
Last Modified: 2013-11-26
I'm using ASP.Net (VB.Net) 2005. Working specifically with the Telerik RadGrid which is inherited from Microsoft's Datagrid.  I am reading my ToolTips from xml which I convert into a dataset and bind to the grid.  That part works fine.  My question is: What is an easy way to add a style to the ToolTip on the datagrid?  For example my tooltip's background needs to be blue with black borders. Here is a sniplet of how I am binding the data to the templategridcolumn and tooltip:
'******************Client side Code ******************************************
 <radG:GridTemplateColumn DataField="DESC"  Groupable="False" UniqueName="DESC" >
                            <ItemStyle horizontalalign="Left" VerticalAlign="Middle" Height="20px"></ItemStyle>
                            <headertemplate>T</headertemplate>
                            <itemtemplate>                                
                            <asp:Label id="lblDes" Runat="server"   ToolTip='<% #GetToolTip(Container.DataItem ,"DESC")%>'>
                            <%#FormatColumn(Container.DataItem, "DESC")%></asp:Label>
                            </itemtemplate>
                        </radG:GridTemplateColumn>

'*******************Code Behind**************
 Public Function GetToolTip(ByVal dRowView As DataRowView, ByVal colName As String, Optional ByVal desc As String = "") As String
        If (dRowView.Row.Table.Columns.Contains(colName)) Then
            If (Not IsDBNull(dRowView.Row.Item(colName))) Then
                If (colName = "DESC") Then
                    If (CType(dRowView.Row.Item(colName), String) = "FW") Then
                        Return "Forward Align"
                    ElseIf (CType(dRowView.Row.Item(colName), String) = "RE" Or CType(dRowView.Row.Item(colName), String) = "RW") Then
                        Return "Rear Wheel"
                    ElseIf (CType(dRowView.Row.Item(colName), String) = "BW") Then
                        Return "Back Wheel"
                    End If
                Else
                    Return desc
                End If
            Else
                Return String.Empty
            End If
        Else
            Return String.Empty
        End If
    End Function
0
Comment
Question by:malc77
3 Comments
 
LVL 5

Accepted Solution

by:
Argblat earned 500 total points
ID: 18818889
I don't think you can style tooltips ... they are handled at the browser level.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

746 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now