We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to give tooltip to cells of a column in GGC

Thread ID:

Created:

Updated:

Platform:

Replies:

104933 Aug 29,2012 08:00 AM Sep 4,2012 02:12 AM ASP.NET Web Forms (Classic) 1
loading
Tags: Grouping
varsha
Asked On August 29, 2012 08:00 AM

Hi

I need to give tool tip for all the cells of 2 columns. The tooltip text is same as column/cell text . I tried many options for the same. It would be helpful if I get some sample code.

Thanks,

Varsha

 


Yogeshwaran [Syncfusion]
Replied On September 4, 2012 02:12 AM

Hi Varsha,

 

Thanks for using Syncfusion products.

 

Your requirement to assign tool tip to particular column can be achieved by using QueryCellStyleInfo. Please refer the following code snippet.

 

this.GridGroupingControl1.QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(GridGroupingControl1_QueryCellStyleInfo);

 

 

void GridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)

        {

            if (e.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell || e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell)

            {

                if (e.TableCellIdentity.Column.MappingName == "Name" || e.TableCellIdentity.Column.MappingName == "Currency")

                {

                    e.Style.CellTipText = e.Style.Text;//Assign cell value to tool tip

                }

            }

        }

 

 

 

For your convenience , we have created the sample and same can be downloaded from below link.

 

tooltip.zip

 

Please let us know if you have any concerns.

 

Regards,

Yogesh R


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;