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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

tool tip for a record

Thread ID:





32196 Jul 25,2005 09:47 AM UTC Jul 25,2005 12:39 PM UTC WinForms 8
Tags: GridControl
Catinat Velmourougan
Asked On July 25, 2005 09:47 AM UTC

hi I need to display a tool tip for a record whenever the mouse hovers above it.How to achieve this? regards, Catinat

Administrator [Syncfusion]
Replied On July 25, 2005 10:07 AM UTC

Handle the PrepareViewStyleInfo the value of e.RowIndex.

Catinat Velmourougan
Replied On July 25, 2005 10:23 AM UTC

hi , Your reply is unclear to me. I have gone searched through your KB, Forums and samples and found only tool tip texts for a cell. The requirement is for current row. Can you explain in more detail? regards, Catinat

Catinat Velmourougan
Replied On July 25, 2005 10:36 AM UTC

hi Heres the code which I think will throw up more insight into my problem, In my mouse hover event I have written this code : Record record = this.GroupingGrid.SyncfusionGridControl.Table.CurrentRecord; string col1 = Convert.ToString(record.GetValue("COL1")); string col2 = Convert.ToString(record.GetValue("COL2")); string toolTipText = col1 + col2; How to set this toolTiptext to the current row?

Administrator [Syncfusion]
Replied On July 25, 2005 10:38 AM UTC

1) Subscribe to the grid.PrepareViewStyleInfo event. 2) In your handler, set the e.Style.CellTipText property based on e.RowIndex.
private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
	if(e.ColIndex > 0 && e.RowIndex > 0)
		e.Style .CellTipText = string.Format("Tip for row {0}. Cell value={1}", e.RowIndex, this.gridDataBoundGrid1[e.RowIndex, e.ColIndex].CellValue);


Administrator [Syncfusion]
Replied On July 25, 2005 10:47 AM UTC

You did not mention you were using a GridGroupingControl. Instead of PrepareViewStyleInfo, in a GridGroupingControl, you should use the QueryCellStyleInfo event to set the tip.
private void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
	if(e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell
		|| e.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell)
		GridRecordRow rec = e.TableCellIdentity.DisplayElement as GridRecordRow;
		if(rec.ParentRecord != null)
			e.Style.CellTipText = rec.ParentRecord.GetValue("Col1") + "  " + rec.ParentRecord.GetValue("Col2");

Catinat Velmourougan
Replied On July 25, 2005 10:49 AM UTC

hi, I havent yet tried what you said. I feel it may not work. Will the following conditions prevent the above solution from working? Its grouping grid. I dont know the index of cols, only names. These cols are not visible cols.

Administrator [Syncfusion]
Replied On July 25, 2005 11:39 AM UTC

The code I posted for QueryCellStyleInfo above was copied it from a working sample. Try it. http://www.syncfusion.com/Support/user/uploads/GDBG_ToolTip_44ab7f50.zip

Catinat Velmourougan
Replied On July 25, 2005 12:39 PM UTC

Its working fine. Thanks Regards, Catinat


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon