Ticket CQ62667
Visible to All Users

How to create an ASPxGridView cell tooltip with values from other datacolumn?

created 18 years ago

I would like to create a tooltip within the grid cells that contains text provided from another bound column. For example, assume I have a grid that contains a list of CategoryNames and CategoryValues. I have another bound column that has a CategoryDescription that I would only like to show upon a mouse-over of the CategoryName cell. I have seen the use of the grid_HtmlDataCellPrepared event, but cannot determine how to use this to attach towards another bound-column value.

Answers

created 18 years ago

Hi Michael,
Please refer to the tooltip thread to learn how to implement cell tooltips. If you wish to set another field value to the "title" attribute value, you should use the following code:

C#
protected void ASPxGridView1_HtmlDataCellPrepared(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewTableDataCellEventArgs e) { e.Cell.Attributes.Add("title", e.GetValue(SomeOtherFieldName).ToString()); }

Thanks,
Plato

    Comments (1)
    DevExpress Support Team 14 years ago

      The example is attached.

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.