This is a migrated thread and some comments may be shown as answers.

ToolTipService.GetToolTip Value is Null Exception

1 Answer 96 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Phillip
Top achievements
Rank 1
Phillip asked on 13 Jul 2016, 09:51 AM

Hi everyone,

in the attached file you see the exception I get (Sorry, it's in German). The Problem with this exception is, that it appears not every time by doing the same steps. So we can't say definititly what step let this exception occures.

 

So here are the circumstances:

  • RadGradView with some columns (4-5)
  • Binding on a DataTable
  • ReadOnly  = false

So when from a dialog a value is puttin' in one of the cells, the problem somtimes appears.

I downloaded the source code and searched a bit. (In GridView_WPF.sln: GridView/Cells/GridViewCell.cs) 

In the method 'PrepareCellToolTip' the second time when ToolTipService.GetToolTip is called:

var visualElementToolTip = ToolTipService.GetToolTip(this);
var isCellErrorToolTip = this.CellErrorMessage != null && this.CellErrorMessage == visualElementToolTip;
 
 var row = this.ParentRow as GridViewRow;
 var rowToolTip = ToolTipService.GetToolTip(row) ?? string.Empty;

Before row is hand over to 'GetToolTip()',  there should be proved if it isn't null, right?

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivan Ivanov
Telerik team
answered on 18 Jul 2016, 07:54 AM
Hello,

I did not manage to reproduce the reported issue on my side. However, you are definitely right, missing the "!= null", makes this method potentially vulnerable. We will add a "blind fix" in the next internal build (next Monday).

Regards,
Ivan Ivanov
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
GridView
Asked by
Phillip
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Share this question
or