Solved

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

Posted on 2007-03-29
3
1,345 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

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…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

920 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

16 Experts available now in Live!

Get 1:1 Help Now