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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

No TooltipTemplateSelector if CellStyle has property IsEnabled=false

Thread ID:

Created:

Updated:

Platform:

Replies:

128104 Jan 2,2017 07:47 PM UTC Jan 4,2017 06:39 PM UTC WPF 3
loading
Tags: SfDataGrid
Harald Betzler
Asked On January 2, 2017 07:47 PM UTC

Hi,

I'm not able to implement a working TooltipTemplateSelector for cells with property IsEnabled=false.

The TooltipTemplateSelector will be instantiated correctly, but the SelectTemplate method will never be called.

When IsEnabled is set to true, then TooltipTemplateSelector works as expected.

In my eyes this is a bug and should be fixed.

Regards
Harald

Jai Ganesh S [Syncfusion]
Replied On January 3, 2017 01:02 PM UTC

Hi Herald, 
You can show the tooltip for disabled cells by using CurrentCellActivating event instead of disabling the cells. 
this.AssociatedObject.CurrentCellActivating += AssociatedObject_CurrentCellActivating; 
 
private void AssociatedObject_CurrentCellActivating(object sender, CurrentCellActivatingEventArgs e) 
{ 
    if (this.AssociatedObject.Columns[e.CurrentRowColumnIndex.ColumnIndex].MappingName == "Value") 
    { 
        var rowIndex = e.CurrentRowColumnIndex.RowIndex; 
        var recordIndex = this.AssociatedObject.ResolveToRecordIndex(rowIndex); 
        var record = this.AssociatedObject.View.Records[recordIndex].Data as DataItem; 
 
        if (record.ItemType == 2) 
            e.Cancel = true; 
    } 
} 
 
Regards, 
Jai Ganesh S 


Harald Betzler
Replied On January 3, 2017 04:14 PM UTC

Hi Jai,

thank you for the solution.

It works as expected, but in my opinion Tooltips should also be shown on "disabled" cells (without this complex effort).
Maybe you can redirect my wish to your developers.

Regards
Harald

Jai Ganesh S [Syncfusion]
Replied On January 4, 2017 06:39 PM UTC

Hi Harald, 
We regret to inform you that, we cannot showing a tooltip for disabled cells in SfDataGrid. This is the default behavior. However, as we said in our last update, you can use the CurrrentCellActivating event to achieve your requirement. 
Regards, 
Jai Ganesh S 


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.

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

;