Solved

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

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

Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

Question has a verified solution.

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

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
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 Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

734 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