Solved

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

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

Understanding Linux Permissions

Linux for beginners: How to view the permissions associated with files and directories and also how you can change them.

Question has a verified solution.

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

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…
This article discusses four methods for overlaying images in a container on a web page
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 …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

623 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