Textbox Focus Nullrefference exception

Thread is closed for posting
2 posts, 0 answers
  1. Doug
    Doug avatar
    49 posts
    Member since:
    May 2012

    Posted 07 Aug 2012 Link to this post

    Hi

    I've found a bug:
    I have a radTextbox, which has a collapsed visibility by default, and I want to make it visible, and focus it on a button press, and I get a nullrefference exception:

       at Telerik.Windows.Controls.RadTextBox.OnGotFocus(RoutedEventArgs e)
       at System.Windows.Controls.Control.OnGotFocus(Control ctrl, EventArgs e)
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)

    Code:
                inputTextBox.Text = _searchPattern;
                inputTextBox.Watermark = "enter name to find";
                inputTextBox.Visibility = Visibility.Visible;
                inputTextBox.Focus();

    Best Regards
  2. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 07 Aug 2012 Link to this post

    Hi Doug,

    Thank you for contacting us. I was unable to reproduce the issue you described. We had a similar issue before but it has already been fixed. Could you please take a look at the attached project and let me know if I am missing anything. I'd be glad to further assist you. 

    Kind regards,
    Kiril Stanoev
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top