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. Image for the cookie policy date
close icon

Essential GridDataControl - cell tooltip

Hi
How can I set the ToolTip on every cell value within the WPFGridDataControl?
Would appreciate a quick response.

Thanks
-Namita




4 Replies

NJ Namita Jain September 19, 2011 06:27 PM UTC

Any updates?



RV Ramesh V Syncfusion Team September 22, 2011 06:52 AM UTC

Hi Namita,

Thank you for your interest in syncfusion products.

Yes, you can achieve you requirement by setting the tooltip to true as like in the following code. And also you should enable the tooltip in XAML file as like in the following code.


Code Snippet [XAML]:

syncfusion:GridTooltipService.ShowTooltips="True"


Code Snippet[C#]:

void Model_QueryCellInfo(object sender, Syncfusion.Windows.Controls.Grid.GridQueryCellInfoEventArgs e)
{
var identity = ((GridDataStyleInfo)e.Style).CellIdentity;
if (identity == null || identity.Column == null)
return;
if (identity.TableCellType == GridDataTableCellType.RecordCell)
{
e.Style.ShowTooltip = true; // If we set like this by default the tooltip will show the cell values.

}
}

Also we have prepared a sample based on this and please find the sample under the following location.

Sample: http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=TooltipDemo1873480342.zip

Please let us know if this helps.

Regards,
Ramesh




SR Selva Ram March 3, 2012 03:59 PM UTC

Hi,

How to set the tooltip value other than the default value cell value. Say i want to bind to 'Description' property?



RA Riyaj Ahamed I Syncfusion Team March 5, 2012 01:16 PM UTC

Hi Selva,

Thank you for your interest in syncfusion products. Yes, you can set your own tooltip value by using custom tooltip. To use the tooltip you should enable the tooltip in XAML code as follows,

Code Snippet [XAML]:
syncfusion:GridTooltipService.ShowTooltips="True"

By using QueryCellInfoCommand you can set the custom tooltip value as follows,
Code Snippet[C#]:

void QueryCellInfoEventCommandMethod(object parameter)
{
var args = parameter as GridQueryCellInfoEventArgs;
if (args != null)
{
var tableStyleIdentity = ((GridDataStyleInfo)args.Style).CellIdentity;
var identity = ((GridDataStyleInfo)args.Style).CellIdentity;
if (identity == null || identity.Column == null)
return;
if (identity.TableCellType == GridDataTableCellType.RecordCell)
{
args.Style.ShowTooltip = true;
args.Style.TooltipTemplateKey = "myTooltipTemplate";
}
}
}


Also we have prepared a sample based on this and please find the sample from attachment.

Another way is you can set the customer details to ToolTip by handling QueryCellInfo event or command.

Please let us know if this helps.

Regards,
Riyaj Ahamed I




CustomToolTip_6fb22576.zip

Loader.
Live Chat Icon For mobile
Up arrow icon