Use attached to reproduce. Workaround: Use date format that does not display the entire month name.
To reproduce:
radTimePicker1.Value = DateTime.Now.AddDays(10);
radTimePicker1.TimePickerElement.MaskedEditBox.MaskType = Telerik.WinControls.UI.MaskType.FreeFormDateTime;
Workaround:
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
radTimePicker1.Value = DateTime.Now.AddDays(10);
var provider = radTimePicker1.TimePickerElement.MaskedEditBox.Provider as FreeFormDateTimeProvider;
provider.MinDate = DateTime.MinValue;
provider.MaxDate = DateTime.MaxValue;
}
The Free Form Date Time Parsing of a RadTimePicker is not able to recognize "hhmm" as an legit value (ex. 1030 for half pas ten). This improvement could be nice, as it is a common way to write an time. It is working in Outlook Appointement Form.
Workaround:
public RadForm1()
{
InitializeComponent();
this.radSpinEditor1.SpinElement.TextChanging += SpinElement_TextChanging;
this.radSpinEditor1.TextChanged += radSpinEditor1_TextChanged;
}
private void SpinElement_TextChanging(object sender, Telerik.WinControls.TextChangingEventArgs e)
{
int numericValue = 0;
if (!int.TryParse(e.NewValue, out numericValue))
{
this.radSpinEditor1.Tag = e.OldValue;
e.Cancel = false;
}
}
private void radSpinEditor1_TextChanged(object sender, EventArgs e)
{
if (this.radSpinEditor1.Tag != null)
{
this.radSpinEditor1.SpinElement.Text = this.radSpinEditor1.Tag.ToString();
this.radSpinEditor1.Tag = null;
}
}
Workaround: use RadTextBoxControl.
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;
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 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);
How to reproduce:
Just open the popup with the Alt and Down arrow key combination, you will notice that the value changes
Workaround:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.radDateTimePicker1.DateTimePickerElement.KeyDown += DateTimePickerElement_KeyDown;
}
private void DateTimePickerElement_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.F4 || (e.KeyData == (Keys.Alt | Keys.Down)))
{
e.Handled = true;
}
}
}
to reproduce this bug : add RadDateTimePicker and set culture to fa-IR change the header navigation mode to zoom with : Me.radDateTimePicker1.DateTimePickerElement.Calendar.HeaderNavigationMode = HeaderNavigationMode.Zoom popup the date time picker then georgian dates are displayed i'll attach screenshots of what happening.
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);
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);
}
}
}
Workaround:
class MyTextBoxInputHandler : TextBoxInputHandler
{
public MyTextBoxInputHandler(RadTextBoxControlElement el) : base(el)
{
}
public override bool ProcessMouseWheel(MouseEventArgs e)
{
return false;
}
}
radTextBoxControl1.TextBoxElement.InputHandler = new MyTextBoxInputHandler(radTextBoxControl1.TextBoxElement);
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;
}
}
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.
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();
}
}
}
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
The issue exist in the versions after Q1 2017
Workaround:
Class MyTextBox
Inherits RadTextBoxControl
Protected Overrides Function CreateTextBoxElement() As RadTextBoxControlElement
Return New MyTextBoxElement()
End Function
End Class
Class MyTextBoxElement
Inherits RadTextBoxControlElement
Protected Overrides ReadOnly Property ThemeEffectiveType As Type
Get
Return GetType(RadTextBoxControlElement)
End Get
End Property
Protected Overrides Function CreateViewElement() As TextBoxViewElement
Return New MyWrapPanel
End Function
End Class
Class MyWrapPanel
Inherits TextBoxViewElement
Protected Overrides Function InsertTextBlocks(index As Integer, text As String, blockType As Type) As Integer
If String.IsNullOrEmpty(text) Then
Return index
End If
Dim textBuilder As New StringBuilder()
For i As Integer = 0 To text.Length - 1
Dim symbol As Char = text(i)
If Char.IsWhiteSpace(symbol) OrElse symbol = TextBoxViewElement.TabSymbol OrElse symbol = TextBoxViewElement.LineFeedSymbol OrElse symbol = TextBoxViewElement.CarriageReturnSymbol Then
If textBuilder.Length > 0 Then
Dim textBlock As ITextBlock = Me.CreateBlock(textBuilder.ToString(), blockType)
If index >= Me.Children.Count Then
Me.Children.Add(TryCast(textBlock, RadElement))
index = Me.Children.Count - 1
textBlock.Index = index
Else
textBlock.Index = index
Me.Children.Insert(index, TryCast(textBlock, RadElement))
End If
textBuilder = New StringBuilder()
index += 1
End If
Dim tabBlock As ITextBlock = Me.CreateBlock(symbol.ToString(), blockType)
tabBlock.Index = index
Me.Children.Insert(index, TryCast(tabBlock, RadElement))
index += 1
Continue For
End If
textBuilder.Append(symbol)
Next
If textBuilder.Length > 0 Then
Dim textBlock As ITextBlock = Me.CreateBlock(textBuilder.ToString(), blockType)
textBlock.Index = index
Me.Children.Insert(index, TryCast(textBlock, RadElement))
index += 1
End If
Return index - 1
End Function
End Class