To reproduce: - Set the AutoSelectNextPart property to true. - Selelct the entire text and try to enter the date. Workaround: radTimePicker1.TimePickerElement.KeyDown += TimePickerElement_KeyDown; void TimePickerElement_KeyDown(object sender, KeyEventArgs e) { if (this.radTimePicker1.TimePickerElement.MaskedEditBox.TextBoxItem.Text.Trim('A', 'P', 'M', ' ') == this.radTimePicker1.TimePickerElement.MaskedEditBox.TextBoxItem.SelectedText.Trim('A', 'P', 'M', ' ')) { ((MaskDateTimeProvider)radTimePicker1.TimePickerElement.MaskedEditBox.Provider).SelectFirstEditableItem(); e.Handled = true; } }
To reproduce: private void MdiChildForm_Load(object sender, EventArgs e) { radMaskedEditBox1.MaskType = MaskType.Numeric; radMaskedEditBox1.Mask = "n4"; radMaskedEditBox1.NullText = "this is null text" } private void radButton1_Click(object sender, EventArgs e) { radMaskedEditBox1.Value = null; } the issue appears also when the RadmaskedEditBox is configured like this: this.radMaskedEditBox1.MaskType = Telerik.WinControls.UI.MaskType.Standard; this.radMaskedEditBox1.Mask = "0000000"; this.radMaskedEditBox1.NullText = "My null text"; this.radMaskedEditBox1.PromptChar = '_'; WORKAROUND: radMaskedEditBox1.Value = null; radMaskedEditBox1.MaskedEditBoxElement.TextBoxItem.HostedControl.Text = "";
When you inherit from RadTextBox and override the OnKeyPress or OnKeyDown, those events are not fired.
To reproduce: 1. Add UserControl 2. Drag and drop RadPopupEditor and RadPopupContainer 3. Open the smart tag of RadPopupEditor and try to set the AssociatedControl property. You will see error message from attached image. Workaround: Set the AssociatedControl at run time. Here is the code snippet: For C#: public UserControl1() { InitializeComponent(); this.radPopupEditor1.AssociatedControl = this.radPopupContainer1; } For VB: Public Class UserControl1 Inherits UserControl Public Sub New() InitializeComponent() Me.RadPopupEditor1.AssociatedControl = Me.RadPopupContainer1 End Sub End Class
Workaround: RadPopupContainer1.BindingContext = New BindingContext()
Keyboard input does not work in RadDateTimePicker when the Culture is ar-SA
ADD. Popup control which can host controls and be associated with a button or opened on request.
To reproduce: 1. Add a RadTextBox 2. Set the AutoCompleteMode property to SuggestAppend 3. Add a RadSpellChecker and set the AutoSpellCheckControl property the text box 4. Start typing. You will notice that the autocomplete functionality behaves as expected. But the incorrect words are not underlined. Workaround: use RadTextBoxControl
To reproduce: use the following code: public Form1() { InitializeComponent(); Label l1 = new Label(); l1.Text = "Label&1"; l1.Location = new Point(10, 20); this.Controls.Add(l1); RadTextBox tb = new RadTextBox(); tb.Location = new Point(150, 20); this.Controls.Add(tb); Label l2 = new Label(); l2.Text = "Label&2"; l2.Location = new Point(10, 50); this.Controls.Add(l2); RadTextBoxControl tbc = new RadTextBoxControl(); tbc.Location = new Point(150, 50); this.Controls.Add(tbc); Label l3 = new Label(); l3.Text = "Label&3"; l3.Location = new Point(10, 80); this.Controls.Add(l3); RadMaskedEditBox meb = new RadMaskedEditBox(); meb.Location = new Point(150,80); this.Controls.Add(meb); } If you press Alt +2, the RadTextBoxControl will get focus. However, if you press Alt + 3, the RadMaskedEditBox will not display the caret. The control actually gets focus, but the inner text box does not. Workaround: private void radMaskedEditBox1_GotFocus(object sender, EventArgs e) { this.radMaskedEditBox1.MaskedEditBoxElement.TextBoxItem.TextBoxControl.Focus(); }
Workaround: this.radTextBoxControl1.TextBoxElement.AutoCompleteDropDown.PopupOpening += AutoCompleteDropDown_PopupOpening; private void AutoCompleteDropDown_PopupOpening(object sender, CancelEventArgs args) { RadPopupOpeningEventArgs a = args as RadPopupOpeningEventArgs; if (a != null ) { a.CustomLocation = new Point(a.CustomLocation.X,a.CustomLocation.Y + 20); } }
Place a RadTextBox on a form and set its anchor to Left, Top, Right. Show the form in a maximized mode. You will notice that the RadTextBox is longer than it should be. The workaround concerns setting the AutoSize property of RadTextBox to false.
Workaround: this.radDateTimePicker1.DateTimePickerElement.ShowTimePicker = true; RadDateTimePickerCalendar calendarBehavior = this.radDateTimePicker1.DateTimePickerElement.GetCurrentBehavior() as RadDateTimePickerCalendar; calendarBehavior.PopupControl.Opened += PopupControl_Opened; calendarBehavior.PopupControl.Opening+=PopupControl_Opening; calendarBehavior.PopupControl.Closing+=PopupControl_Closing; calendarBehavior.PopupControl.Closed+=PopupControl_Closed;
Please refer to the attached gif file. Workaround: public Form1() { InitializeComponent(); this.radSpellChecker1.AutoSpellCheckControl = this.radTextBoxControl1; this.radTextBoxControl1.Multiline = true; this.radTextBoxControl1.ContextMenuOpening += radTextBoxControl1_ContextMenuOpening; } public static bool containsError = false; public static bool isMisspelledWord = true; private void radTextBoxControl1_ContextMenuOpening(object sender, TreeBoxContextMenuOpeningEventArgs e) { if (!isMisspelledWord && containsError) { //do not show the context when you click over a correct word e.Cancel = true; } } public class MyTextBox : RadTextBoxControl { protected override RadTextBoxControlElement CreateTextBoxElement() { return new MyTextBoxElement(); } public override string ThemeClassName { get { return typeof(RadTextBoxControl).FullName; } } } public class MyTextBoxElement : RadTextBoxControlElement { RadSpellChecker sp = new RadSpellChecker(); protected override void OnMouseDown(MouseEventArgs e) { sp.AutoSpellCheckControl = this.ElementTree.Control; containsError = false; isMisspelledWord = true; if (e.Button == System.Windows.Forms.MouseButtons.Right) { Point location = this.ElementTree.Control.PointToClient(Cursor.Position); TextPosition position = this.Navigator.GetPositionFromPoint(location); this.Navigator.CaretPosition = position; if (this.Multiline) { this.Navigator.ScrollToCaret(); } ITextBoxNavigator navigator = this.Navigator; TextPosition caretPosition = navigator.CaretPosition; LineInfo line = caretPosition.Line; ITextBlock textBlock = caretPosition.TextBlock; string clickedWordInRadTextBox = textBlock.Text; if (string.IsNullOrEmpty(clickedWordInRadTextBox) || clickedWordInRadTextBox == " ") { return; } TextBoxSpellChecker tbSpellChecker = sp.GetControlSpellChecker(typeof(RadTextBoxControl)) as TextBoxSpellChecker; ICollection<string> suggestions = tbSpellChecker.SpellChecker.GetSuggestions(clickedWordInRadTextBox); if (suggestions.Count > 0) { containsError = true; } if (tbSpellChecker.SpellChecker.CheckWordIsCorrect(clickedWordInRadTextBox)) { isMisspelledWord = false; } base.OnMouseDown(e); } } protected override Type ThemeEffectiveType { get { return typeof(RadTextBoxControlElement); } } }
To reproduce: - Set the value of the TimePicker to a value that is different from the current day. - Select the time part and press the up arrow button.
To reproduce: AddHandler RadAutoCompleteBox1.Validating, Sub() 'add new item to list Dim txt As String = RadAutoCompleteBox1.Text Dim add As String = String.Empty If Not String.IsNullOrEmpty(txt) Then If Not txt.EndsWith(";") Then 'new item! If txt.Contains(";") Then _addWg = txt.Split(";").Last Else _addWg = txt End If RadAutoCompleteBox1.Text = RadAutoCompleteBox1.Text & ";" End If End If End Sub '--------------- 'We update the datasource when we lost focus.... AddHandler RadAutoCompleteBox1.LostFocus, Sub() If Not String.IsNullOrEmpty(_addWg) AndAlso Not wgAcSource.Contains(_addWg) Then wgAcSource.Add(_addWg) RadAutoCompleteBox1.AutoCompleteDataSource = Nothing RadAutoCompleteBox1.AutoCompleteDataSource = wgAcSource _addWg = String.Empty End If End Sub Workaround: Add the item and reset the data source in the KeyDown event for example when the user presses Enter.
To reproduce: -add a RadTimePicker; -change its culture: this.radTimePicker1.Culture = new System.Globalization.CultureInfo("en-GB"); Workaround: public Form1() { InitializeComponent(); this.radTimePicker1.Culture = new System.Globalization.CultureInfo("en-GB"); this.radTimePicker1.TimePickerElement.PopupForm.Height =350; }
When you set a specific value to the RadTimePicker e.g. new DateTime(2014, 5, 20, 8, 15, 30) and try to change the time via mouse wheel or up/down arrows, the date part is reset to DateTime.Now. Resolution: This broke RadTimePicker functionality because many users have serialized in designer.cs/vb files MinValue and MaxValues and now they date part is take under consideration - this can complete broke its application. Users should keep the date part in separate variable not in TimePicker Value property
FIX. RadDropDownList- when the form is started the textbox shows the end of the text instead of the begging of it, when the used text is longer than the control length.
To reproduce: Change the monitors positions in the settings panel and try out on both monitors. Please refer to the attached file. Workaround: Dim tbLocation = Point.Empty Sub New() InitializeComponent() Me.RadTextBox1.Text = "Once uppon " Dim tbSpellChecker As TextBoxSpellChecker = Me.RadSpellChecker1.GetControlSpellChecker(GetType(RadTextBox)) AddHandler tbSpellChecker.DropDownMenu.PopupOpening, AddressOf PopupOpening AddHandler Me.RadTextBox1.TextBoxElement.TextBoxItem.HostedControl.MouseDown, AddressOf RadTextBox1_MouseDown End Sub Private Sub PopupOpening(sender As Object, args As System.ComponentModel.CancelEventArgs) Dim e As RadPopupOpeningEventArgs = TryCast(args, RadPopupOpeningEventArgs) If e IsNot Nothing Then e.CustomLocation = tbLocation End If End Sub Private Sub RadTextBox1_MouseDown(sender As Object, e As MouseEventArgs) If e.Button = Windows.Forms.MouseButtons.Right Then tbLocation = Me.RadTextBox1.PointToScreen(e.Location) End If End Sub