FIX. RadMarkUpEditor does not keep the formatting when IE9 is installed - opening the dialog, formatting the text and switching to html view removes all formatting.
When you focus a RadTextBox you will notice the keyboard button that popups next to the focused control. However, for the RadAutoCompleteBox this keyboard button does not show. Workaround: show it manually on the GotFocus event and hide it on the LostFocus event private void radTextBox1_GotFocus(object sender, EventArgs e) { string progFiles = @"C:\Program Files\Common Files\Microsoft Shared\ink"; string keyboardPath = Path.Combine(progFiles, "TabTip.exe"); Process.Start(keyboardPath); } private void radTextBox1_LostFocus(object sender, EventArgs e) { var procs = Process.GetProcessesByName("TabTip"); if (procs.Length != 0) procs[0].Kill(); }
To reproduce: - Add RadDateTimepicker and bind it to a bindingsource. - Set the AutoSelectNextPart property to true. - Set the datasource of the binding source. - The AutoSelectNextPart property is reset to false. Workaround: - Set the property after the bindingsource is initialized.
To reproduce: 1. Enter some text and click the first button. Both properties, Text and Value contain the expected value. 2. Click the second button to clear the text and value. 3. Enter some text again and click the first button. You will notice that the Value remains empty. public RadForm1() { InitializeComponent(); this.radMaskedEditBox1.MaskType = Telerik.WinControls.UI.MaskType.None; this.radMaskedEditBox1.Mask = "CCCCCCC"; } private void radButton1_Click(object sender, EventArgs e) { this.radLabel1.Text = "Text: " + this.radMaskedEditBox1.Text; this.radLabel2.Text = "Value: " + this.radMaskedEditBox1.Value + ""; } private void radButton2_Click(object sender, EventArgs e) { this.radMaskedEditBox1.Clear(); } Workaround: use MaskType.Standard
To reproduce: 1. Drag and drop RadColorBox 2. Add localization provider. Use the following article http://www.telerik.com/help/winforms/forms-and-dialogs-colordialog-localization.html 3. Open ColorDialogForm and choose color which name was localized too. Close the form 54 You will see that the text of RadColorBox is not localized name, it`s system name. Workaround: 1. Subscribe to the ValueChanged event 2. Replace the text of RadColorBox with localized color name void radColorBox_ValueChanged(object sender, EventArgs e) { string localizedColor = Telerik.WinControls.UI.ColorDialogLocalizationProvider.CurrentProvider.GetLocalizedString(this.radColorBox.ColorDialog.SelectedColor.Name); this.radColorBox.ColorBoxElement.TextBoxItem.Text = localizedColor; }
To reproduce: -Add RadBrowseEditor to a form and set the DialogType to FolderBrowseDialog. -At runtime click the browse button to open the "Browse For Folder" dialog and click the "Make New Folder", type a name for the newly created folder BUT DO NOT PRESS THE ENTER KEY and click the OK button, the Value is set to "New Folder" instead of the name I have typed.
FIX. RadMaskedEditBox - the minus sign is stripped our with ExcludePromptAndLiterals and IncludePrompt formats with currency mask, while it should not.
To reproduce: Me.RadDateTimePicker1.Format = DateTimePickerFormat.Custom Me.RadDateTimePicker1.CustomFormat = "MM/dd/yyyy" Dim provider As MaskDateTimeProvider = TryCast(Me.RadDateTimePicker1.DateTimePickerElement.TextBoxElement.Provider, MaskDateTimeProvider) provider.AutoSelectNextPart = True If you type in 01/01/50, RadDateTimePicker displays 01/01/1950 which is correct. If you type in 01/01/2050, the system is again changing the century and display 01/01/1950 which is incorrect. Workaround: use a custom mask provider to customize how the autocompletion work: Public Class CustomMaskDateTimeProvider Inherits Telerik.WinControls.UI.MaskDateTimeProvider Public Sub New(mask As String, culture As CultureInfo, owner As RadMaskedEditBoxElement) MyBase.New(mask, culture, owner) End Sub Protected Overrides Function HandleKeyPress(part As MaskPart, e As KeyPressEventArgs) As Boolean Dim value As Integer = 0 If Not Integer.TryParse(e.KeyChar.ToString(), value) Then Return True End If Dim stringValue As String = String.Empty If part.type = PartTypes.MiliSeconds Then Dim newValue As Integer = CInt((part.value / Math.Pow(10, (3 - part.len)))) * 10 + value part.value = newValue Mod CInt(Math.Pow(10, part.len)) Else stringValue = part.value.ToString() If stringValue.Length = part.len AndAlso stringValue.Length >= part.maskPart.Length Then stringValue = stringValue.Substring(1) End If If Me.AutoCompleteYear AndAlso stringValue.Length = 1 Then stringValue = String.Empty End If part.value = Integer.Parse(stringValue & e.KeyChar) End If If part.type = PartTypes.Year AndAlso part.maskPart.Length = 2 Then Dim len As Integer = part.value.ToString().Length part.value = Integer.Parse(String.Format("{0}{1}", DateTime.Now.Year.ToString().Substring(0, 2), part.value.ToString().Substring(len - 2, 2))) End If If Me.AutoCompleteYear AndAlso part.type = PartTypes.Year Then Dim len As Integer = part.value.ToString().Length If len >= 2 Then part.value = Integer.Parse(part.value.ToString().Substring(len - 2, 2)) End If 'If part.value >= 50 AndAlso part.value <= 99 Then ' part.value += 1900 'ElseIf part.value >= 500 AndAlso part.value <= 999 Then ' part.value += 1000 'ElseIf part.value < 50 OrElse (part.value > 99 AndAlso part.value < 500) Then part.value += 2000 ' End If End If If part.value > part.max OrElse part.value < part.min Then part.value = value End If Return True End Function End Class Me.RadDateTimePicker1.Format = DateTimePickerFormat.Custom Me.RadDateTimePicker1.CustomFormat = "MM/dd/yyyy" Me.RadDateTimePicker1.DateTimePickerElement.TextBoxElement.Provider = New CustomMaskDateTimeProvider(Me.RadDateTimePicker1.DateTimePickerElement.TextBoxElement.Mask, Me.RadDateTimePicker1.Culture, Me.RadDateTimePicker1.DateTimePickerElement.TextBoxElement) Dim provider As MaskDateTimeProvider = TryCast(Me.RadDateTimePicker1.DateTimePickerElement.TextBoxElement.Provider, MaskDateTimeProvider) provider.MaxDate = Me.RadDateTimePicker1.DateTimePickerElement.MaxDate provider.AutoSelectNextPart = True provider.AutoCompleteYear = True Thus, the year always be 2000+.
Steps to reproduce: 1. Add a RadPropertyGrid to a form. 2. Select an object with DateTime property 3. Subscribe to the EditorInitialize event and set min and max date. 4. Run the application and open the property for edit. Type in a value outside the valid range and end edit. You will see that the invalid value is saved.
Use attached to reproduce. - Open the dialog multiple times.
RadMaskEditBox - When MaskType is Numeric and Mask is currency ("C") pasting a value (9.99) results in 09.99.00
When RadDateTimePicker value is set to null then you are not able to enter in the control, a date which is less than the NullValue date.
https://msdn.microsoft.com/en-us/library/system.windows.forms.maskedtextbox.maskcompleted(v=vs.110).aspx
When MaskType is Numeric and Mask is currency ("C") selecting the last two digits and trying to enter value for them results in moving the caret at the end of the last digit right after entering the first number.
To reproduce: Me.RadDateTimePicker2.Format = DateTimePickerFormat.Custom Me.RadDateTimePicker2.CustomFormat = "hh:mm tt" Select the hours part with the mouse, the selection is affected correctly. Select the minutes part, the selection is affected correctly. Select the AM/PM part, the selection is again affected correctly. Now, try to select again the minutes part. You will notice that the cursor is affected correctly but the selection is missing. Once you select the AM/PM part then the selection is not updated properly with the mouse anymore. Workaround: Me.RadDateTimePicker1.DateTimePickerElement.TextBoxElement.Provider = New CustomMaskDateTimeProvider(Me.RadDateTimePicker2.DateTimePickerElement.TextBoxElement.Mask, Me.RadDateTimePicker2.Culture, Me.RadDateTimePicker2.DateTimePickerElement.TextBoxElement) Public Class CustomMaskDateTimeProvider Inherits MaskDateTimeProvider Public Sub New(mask As String, culture As CultureInfo, owner As RadMaskedEditBoxElement) MyBase.New(mask, culture, owner) End Sub Public Overrides Function SelectCurrentItemFromCurrentCaret() As Boolean Dim currentSelection As Integer = Me.TextBoxItem.SelectionStart Dim currentPos As Integer = 0 Dim selected As Boolean = False 'If Me.List(Me.SelectedItemIndex).type = PartTypes.AmPm Then ' Return True 'End If For i As Integer = 0 To Me.List.Count - 1 Dim part As MaskPart = Me.List(i) If SelectMilliseconds(i, part) Then Exit For End If If currentSelection >= part.offset AndAlso currentSelection <= part.offset + part.len AndAlso Not part.[readOnly] AndAlso part.type <> PartTypes.Character Then Me.TextBoxItem.SelectionStart = Me.List(i).offset Me.TextBoxItem.SelectionLength = Me.List(i).len Me.SelectedItemIndex = i selected = True Exit For End If currentPos += part.len Next Return selected End Function Private Function SelectMilliseconds(ByVal i As Integer, ByVal part As MaskPart) As Boolean If part.type = PartTypes.MiliSeconds AndAlso Me.value.Millisecond Mod 10 = 0 AndAlso part.trimsZeros Then Dim newLen As Integer = part.len For power As Integer = 1 To part.len If Me.value.Millisecond Mod Math.Pow(10, power) = 0 Then newLen -= 1 Else Exit For End If Next Me.textBoxItem.SelectionStart = Me.list(i).offset Me.textBoxItem.SelectionLength = newLen Me.SelectedItemIndex = i Return True End If Return False End Function End Class
If the null date of RadDateTimePicker is current date, you cannot set its value to the same date.
Fix suggest behavior in RadAutoCompleteBox to support spaces in the written text. WORKAROUND: public class MyAutoCompleteBox : RadAutoCompleteBox { public MyAutoCompleteBox() { this.ThemeClassName = typeof(RadAutoCompleteBox).FullName; } protected override RadTextBoxControlElement CreateTextBoxElement() { return new MyAutoCompleteBoxElement(); } } public class MyAutoCompleteBoxElement : RadAutoCompleteBoxElement { protected override Type ThemeEffectiveType { get { return typeof(RadAutoCompleteBoxElement); } } public override void CloseDropDown(RadPopupCloseReason reason) { if (reason == RadPopupCloseReason.CloseCalled) { if (this.ListElement.SuggestedText != null && this.ListElement.PatternText != null && this.ListElement.IsSuggestionMatched) { return; } } base.CloseDropDown(reason); } protected override RadTextBoxListElement CreateListElement() { return new RadTextBoxListElement(); } }