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

Textbox Focus Nullrefference exception

1 Answer 36 Views
TextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Doug
Top achievements
Rank 1
Doug asked on 07 Aug 2012, 11:39 AM
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

1 Answer, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 07 Aug 2012, 02:47 PM
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.

Tags
TextBox
Asked by
Doug
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Share this question
or