Please refer to the attached screenshot. Workaround: Me.RadDateTimePicker1.DateTimePickerElement.TextBoxElement.MaxSize = New Size(0, 20)
To reproduce: this.radDateTimePicker1.ThemeName = "TelerikMetroTouch"; var calendar1 = (radDateTimePicker1.DateTimePickerElement.CurrentBehavior as RadDateTimePickerCalendar); calendar1.ShowTimePicker = true; Workaround: calendar1.Calendar.Width = 250; calendar1.DropDownMinSize = new System.Drawing.Size(500, 250);
How to reproduce: Check also the attached video public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void radButton1_Click(object sender, EventArgs e) { this.radAutoCompleteBox1.AutoCompleteItems.Clear(); List<RadListDataItem> autoCompleteEntries = new List<RadListDataItem>(); for (int i = 0; i < 10000; i++) { autoCompleteEntries.Add(new RadListDataItem("Joe Smith", "joe@fakecompany.com")); autoCompleteEntries.Add(new RadListDataItem("Adam Petersen", "adam@qwerty.com")); autoCompleteEntries.Add(new RadListDataItem("Jack Russel", "jack@russel.nocom")); autoCompleteEntries.Add(new RadListDataItem("Daniel Finger", "daniel.pinger@gmail.com")); autoCompleteEntries.Add(new RadListDataItem("Richard Vail", "rvail@richardvail.com")); autoCompleteEntries.Add(new RadListDataItem("Sebastian Jonnson", "s.jonnson@sjonnson.com")); autoCompleteEntries.Add(new RadListDataItem("Lee Cooper", "lee.cooper@coopercoorp.com")); autoCompleteEntries.Add(new RadListDataItem("Kelvin Clain", "kclain@clainkevin.com")); autoCompleteEntries.Add(new RadListDataItem("Maria Jenson", "mjenson@mariajenson.com")); autoCompleteEntries.Add(new RadListDataItem("Chelsea Maarten", "chelsea@maarten.com")); } this.radAutoCompleteBox1.AutoCompleteItems.AddRange(autoCompleteEntries); } } Workaround: use Begin/End update block and reset the private patternText field: public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void radButton1_Click(object sender, EventArgs e) { typeof(RadTextBoxListElement).GetField("patternText", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(this.radAutoCompleteBox1.ListElement, null); this.radAutoCompleteBox1.AutoCompleteItems.Clear(); List<RadListDataItem> autoCompleteEntries = new List<RadListDataItem>(); for (int i = 0; i < 10000; i++) { autoCompleteEntries.Add(new RadListDataItem("Joe Smith", "joe@fakecompany.com")); autoCompleteEntries.Add(new RadListDataItem("Adam Petersen", "adam@qwerty.com")); autoCompleteEntries.Add(new RadListDataItem("Jack Russel", "jack@russel.nocom")); autoCompleteEntries.Add(new RadListDataItem("Daniel Finger", "daniel.pinger@gmail.com")); autoCompleteEntries.Add(new RadListDataItem("Richard Vail", "rvail@richardvail.com")); autoCompleteEntries.Add(new RadListDataItem("Sebastian Jonnson", "s.jonnson@sjonnson.com")); autoCompleteEntries.Add(new RadListDataItem("Lee Cooper", "lee.cooper@coopercoorp.com")); autoCompleteEntries.Add(new RadListDataItem("Kelvin Clain", "kclain@clainkevin.com")); autoCompleteEntries.Add(new RadListDataItem("Maria Jenson", "mjenson@mariajenson.com")); autoCompleteEntries.Add(new RadListDataItem("Chelsea Maarten", "chelsea@maarten.com")); } this.radAutoCompleteBox1.ListElement.DataLayer.ListSource.BeginUpdate(); this.radAutoCompleteBox1.AutoCompleteItems.AddRange(autoCompleteEntries); this.radAutoCompleteBox1.ListElement.DataLayer.ListSource.EndUpdate(); } }
To reproduce: radMaskedEditBox1.MaskType = MaskType.Numeric; radMaskedEditBox1.Mask = "G"; Then enter 123.45 Workaround: Use "N" mask with fixed decimal places.
To reproduce: add a RadMaskedEditBox and use the following code: Sub New() InitializeComponent() Me.RadMaskedEditBox1.MaskType = Telerik.WinControls.UI.MaskType.Numeric Me.RadMaskedEditBox1.Mask = "N1" Dim item As Item = New Item(Nothing, "Item1") RadMaskedEditBox1.DataBindings.Add("Value", item, "StockTypeId", True, DataSourceUpdateMode.OnPropertyChanged) End Sub Public Class Item Private _stockId As Nullable(Of Integer) Public Sub New(value As Nullable(Of Integer), name As String) Me._stockId = value End Sub Public Property StockTypeId() As Nullable(Of Integer) Get Return _stockId End Get Set(ByVal value As Nullable(Of Integer)) _stockId = value Console.WriteLine(value) End Set End Property End Class The user is not allowed to enter a new numeric value. Wokraround: Public Class CustomNumericCharacterTextBoxProvider Inherits NumericCharacterTextBoxProvider Private owner As RadMaskedEditBoxElement Public Sub New(mask As String, culture As CultureInfo, numericType As NumericCharacterTextBoxProvider.RadNumericMaskFormatType, _ owner As RadMaskedEditBoxElement) MyBase.New(mask, culture, numericType, owner) Me.owner = owner End Sub Protected Overrides Function AllowAppendCharacters() As Boolean If owner.Text = "" AndAlso owner.Mask = "N1" Then Return True End If Return MyBase.AllowAppendCharacters() End Function End Class Public Class CustomMaskedEditBox Inherits RadMaskedEditBox Public Overrides Property ThemeClassName As String Get Return GetType(RadMaskedEditBox).FullName End Get Set(value As String) MyBase.ThemeClassName = value End Set End Property Public Sub New() MyBase.New() Me.MaskType = Telerik.WinControls.UI.MaskType.Numeric Me.Mask = "N1" Dim numericMaskProvider As NumericMaskTextBoxProvider = Me.MaskedEditBoxElement.Provider Dim fi As FieldInfo = GetType(NumericMaskTextBoxProvider).GetField("provider", BindingFlags.Instance Or BindingFlags.NonPublic) fi.SetValue(numericMaskProvider, _ New CustomNumericCharacterTextBoxProvider(numericMaskProvider.Mask, numericMaskProvider.Culture, _ NumericMaskTextBoxProvider.GetFormat(numericMaskProvider.Mask, numericMaskProvider.Culture), _ Me.MaskedEditBoxElement)) End Sub End Class
To reproduce: use the following code snippet and try to input some numeric value public RadForm1() { InitializeComponent(); this.radMaskedEditBox1.MaskType = Telerik.WinControls.UI.MaskType.Numeric; this.radMaskedEditBox1.ValueChanged += radMaskedEditBox1_ValueChanged; } private void radMaskedEditBox1_ValueChanged(object sender, EventArgs e) { Console.WriteLine(this.radMaskedEditBox1.Value); }
How to reproduce: public partial class Form1 : Form { RadDateTimePicker dateTimePicker; public Form1() { InitializeComponent(); this.dateTimePicker = new RadDateTimePicker(); this.dateTimePicker.DateTimePickerElement.Calendar.HeaderNavigationMode = HeaderNavigationMode.Zoom; this.Controls.Add(this.dateTimePicker); } } Workaround: public partial class Form1 : Form { RadDateTimePicker dateTimePicker; public Form1() { InitializeComponent(); this.dateTimePicker = new RadDateTimePicker(); this.dateTimePicker.DateTimePickerElement.Calendar.PropertyChanged += Calendar_PropertyChanged; this.dateTimePicker.DateTimePickerElement.Calendar.HeaderNavigationMode = HeaderNavigationMode.Zoom; this.Controls.Add(this.dateTimePicker); } private void Calendar_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { if (e.PropertyName == "FocusedDate") { int year = this.dateTimePicker.DateTimePickerElement.Calendar.FocusedDate.Year; if (year <= this.dateTimePicker.MinDate.Year) { this.dateTimePicker.DateTimePickerElement.Calendar.HeaderNavigationMode = HeaderNavigationMode.None; } else { this.dateTimePicker.DateTimePickerElement.Calendar.HeaderNavigationMode = HeaderNavigationMode.Zoom; } } } }
To reproduce: Add a RadTextBoxControl and set the SelectionColor property to Red. You will notice that the selection color is semi-transparent and it seems like pink. In order to obtain real Red selection color, it is necessary to set the SelectionOpacity property to 255. However, the selected text is not visible. Please refer to the attached screenshot. Workaround: public class CustomTextBoxControl : RadTextBoxControl { public override string ThemeClassName { get { return typeof(RadTextBoxControl).FullName; } } protected override RadTextBoxControlElement CreateTextBoxElement() { return new CustomRadTextBoxControlElement(); } } public class CustomRadTextBoxControlElement : RadTextBoxControlElement { protected override Type ThemeEffectiveType { get { return typeof(RadTextBoxControlElement); } } protected override TextBoxViewElement CreateViewElement() { return new CustomTextBoxViewElement(); } } public class CustomTextBoxViewElement : TextBoxViewElement { protected override void PaintChildren(IGraphics graphics, Rectangle clipRectange, float angle, SizeF scale, bool useRelativeTransformation) { this.SelectionPrimitive.PaintPrimitive(graphics, angle, scale); base.PaintChildren(graphics, clipRectange, angle, scale, useRelativeTransformation); } protected override void PostPaintChildren(IGraphics graphics, Rectangle clipRectange, float angle, SizeF scale) { if (this.SelectionPrimitive == null) { return; } if (this.Multiline && this.WordWrap) { this.SelectionPrimitive.TextBoxElement.Navigator.RestoreSelection(); } } }
Please refer to the attached sample project and try to open the form's designer. If you comment [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] for the EditarTextBox property (typeof(RadTextBox)), clean and rebuild, the designer is opened as expected. Workaround: use RadTextBoxControl.
Please refer to the attached sample project and attached gif file which illustrates the desired behavior when RadForm1 is run. If you run RadForm2 which uses RadDropDownList, the binding doesn't work as expected. Workaround: this.radDropDownList1.SelectedIndexChanged += RadDropDownList1_SelectedIndexChanged; this.radDropDownList1.DisplayMember = "Naziv"; this.radDropDownList1.ValueMember = "Id"; this.radDropDownList1.DataSource = bs; private void RadDropDownList1_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e) { if (e.Position > -1) { Roditelj parent = this.radDropDownList1.SelectedItem.DataBoundItem as Roditelj; this.radDropDownList2.DataSource = null; this.radDropDownList2.DisplayMember = "Naziv"; this.radDropDownList2.ValueMember = "Id"; this.radDropDownList2.DataSource = parent.Djeca; } }
Use attached project and the following steps: - When the application starts, use the drop down calendar to select another date. - Then press Ctrl+A to select the entire content of the editor and press the Del key to clear the content. - Now press the right arrow key and it crashes with a NullReferenceException inside of the RadDateTimePickerElement.OnKeyDown method. - This bug only occurs when ShowCheckBox is true. Workaround: class MyRadDateTimePicker : RadDateTimePicker { protected override RadDateTimePickerElement CreateElement() { return new MyRadDateTimePickerElement(); } } class MyRadDateTimePickerElement : RadDateTimePickerElement { protected override void OnKeyDown(KeyEventArgs e) { var provider = this.TextBoxElement.Provider as MaskDateTimeProvider; if (e.KeyCode == Keys.Right && provider.List != null) { base.OnKeyDown(e); } } protected override Type ThemeEffectiveType { get { return typeof(RadDateTimePickerElement); } } }
Use the attached project and the following steps: When the application starts, the entire content of the picker control is selected (which is fine). Now press the Del key to clear the entire content. If you then try and type in a date any key you type is shown briefly and is then cleared. It is impossible to type anything until you open the drop down calendar and select something other than 1-1-0001. Once another date is selected you can type normally. Open the drop down calendar and select 1-1-0001 again and the same behavior occurs again. This bug occurs whether or not ShowCheckBox is true. Workaround: - The NullDate should be different that the MinDate radDateTimePicker1.NullDate = DateTime.MinValue.AddDays(1);
To reproduce: - Use the following format: radDateTimePicker1.Format = DateTimePickerFormat.Custom; radDateTimePicker1.CustomFormat = "MM/dd/yyyy"; - Clear the date and try to enter 01/01/2017 (see attched video) Workaround: radDateTimePicker1.NullDate = DateTime.MinValue.AddYears(1);
Workaround: override the ProcessCmdKey method of the form and activate the desired control: protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData== Keys.Tab) { this.ActiveControl = this.radPopupEditor2.PopupEditorElement.TextBoxElement.TextBoxItem.HostedControl; return true; } return base.ProcessCmdKey(ref msg, keyData); } IMPORTANT!!! Tab key should navigate to the next control even if the popup is opened.
To reproduce use the following code and zoom to Years level: this.radDateTimePicker1.Culture = new System.Globalization.CultureInfo("ps-AF"); radDateTimePicker1.DateTimePickerElement.Calendar.HeaderNavigationMode = Telerik.WinControls.UI.HeaderNavigationMode.Zoom;
How to reproduce: run the attached project on a system with an increased scaling - 200% Workaround: the null text needs to be set at run-time and after subscribe the control to the CreateTextBlock event public class MyTextBlock : TextBlockElement { public override void DpiScaleChanged(SizeF scaleFactor) { base.DpiScaleChanged(scaleFactor); this.ResetLayoutCore(); } } this.radTextBoxControl1.TextBoxElement.CreateTextBlock += this.RadTextBoxControl1_CreateTextBlock; private void RadTextBoxControl1_CreateTextBlock(object sender, CreateTextBlockEventArgs e) { e.TextBlock = new MyTextBlock(); }
The new functionality should prevent duplicates to be added as tokens in the editor. An already selected item should not be visible in the popup as well. The attached 1148813-AutocompleteDuplicates.zip project features a possible custom solution.
To reproduce: handle the following event and start typing in the editable part. You will notice that the TextChanged event is not fired: Me.RadPopupEditor1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDown AddHandler Me.RadPopupEditor1.TextChanged, AddressOf RadPopupEditor1_TextChanged Workaround: handle the RadPopupEditor.TextBoxElement.TextChanged event instead.
To reproduce: 1.Add a RadAutoCompleteBox to a form. 2.Add AutoCompleteItems. 3.Start the project. 4.AutoComplete a word and write some normal text. 5.Change few themes (mainly office themes) you will notice that the text's position shifts down. Workaround: Clear each TokenizedTextBlockElement's bottom Margin from the themes using VisualStyleBuilder.