ToolTipService.GetToolTip Value is Null Exception

2 posts, 1 answers
  1. Phillip
    Phillip avatar
    4 posts
    Member since:
    Mar 2016

    Posted 13 Jul 2016 Link to this post

    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?



  2. Answer
    Ivan Ivanov
    Ivan Ivanov avatar
    1201 posts

    Posted 18 Jul 2016 Link to this post


    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).

    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.
Back to Top