The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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.
ADAdministrator 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;
}
}
DLDavid LlewellynNovember 15, 2004 08:01 PM UTC
Thanks Clay,
That makes the program run much faster.
Cheers.