GridGroupingControl Cell Tooltips

Hello, I am trying to set the cells (of a GridGroupingControl) tooltip in PrepareViewStyleInfo, to the same value that is displayed in that cell. Something like this :- private void TableControl_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e) { GridRecordRow rec = this.gridcontrol.Table.DisplayElements[e.RowIndex] as GridRecordRow; if(rec != null) { DataRowView colorrow = rec.GetData() as DataRowView; try { if ((e.ColIndex > 3) && (e.ColIndex < 7)) e.Style.CellTipText = colorrow[e.ColIndex].ToString(); } catch { } } } This method REALLY slows down the grouping grid. Do you know of a better way of setting the tooltips of the cells? Can this be done when the grid is being loaded, instead of setting the cell tooltips value at run-time? Thanks. David.

2 Replies

AD Administrator Syncfusion Team November 14, 2004 10:25 PM UTC

There is no way to set the CellTipText to the Text except through an event, either TableControlPrepareViewStyleInfo or QueryCellStyleInfo. Try this code: private void gridGroupingControl1_TableControlPrepareViewStyleInfo(object sender, GridTableControlPrepareViewStyleInfoEventArgs e) { if ((e.Inner.ColIndex > 3) && (e.Inner.ColIndex < 7)) { e.Inner.Style.CellTipText = e.Inner.Style.Text; } }


DL David Llewellyn November 15, 2004 08:01 PM UTC

Thanks Clay, That makes the program run much faster. Cheers.

Loader.
Up arrow icon