To reproduce - create a form with a button and on click open another form with couple of RadColorBoxes in it. After closing the child form the memory is not released.
FIX. RadDateTimePicker - setting an invalid year with the default format causes the control Text remain with invalid value. At the same time the value of the control is valid.
FIX. RadDateTimePicker - entering a date before the MinDate displays wrong text
To reproduce: add a token to the control and attempt adding the same token with this code in the CreateTextBlock event handler: void radAutoCompleteBox1_CreateTextBlock(object sender, CreateTextBlockEventArgs e) { if (e.TextBlock is TokenizedTextBlockElement) { foreach (RadListDataItem item in radAutoCompleteBox1.AutoCompleteItems) { if (item.Text.ToLower() == e.Text.ToLower()) { e.TextBlock = new TokenizedTextBlockElement("pepo"); break; // TODO: might not be correct. Was : Exit For } } } } Workaround: void radAutoCompleteBox1_CreateTextBlock(object sender, CreateTextBlockEventArgs e) { if (e.TextBlock is TokenizedTextBlockElement) { foreach (RadListDataItem item in radAutoCompleteBox1.AutoCompleteItems) { if (item.Text.ToLower() == e.Text.ToLower()) { TokenizedTextBlockElement element = new TokenizedTextBlockElement(); element.ContentElement.Text = item.Text; e.TextBlock = element; } } } }
To reproduce - add some text to the control and its IsReadOnly to true. Right click and observe the context menu Workaround: radTextBoxControl1.ContextMenuOpening += radTextBoxControl1_ContextMenuOpening; void radTextBoxControl1_ContextMenuOpening(object sender, TreeBoxContextMenuOpeningEventArgs e) { e.ContextMenu.DropDownOpened -= ContextMenu_DropDownOpened; e.ContextMenu.DropDownOpened += ContextMenu_DropDownOpened; } void ContextMenu_DropDownOpened(object sender, EventArgs e) { TextBoxControlDefaultContextMenu contextMenu = (TextBoxControlDefaultContextMenu)sender; if (radTextBoxControl1.IsReadOnly) { foreach (RadMenuItemBase item in contextMenu.Items) { if (item.Text == "Cu&t" || item.Text == "&Copy" || item.Text == "&Paste" || item.Text == "&Delete") { item.Enabled = false; } } } }
To reproduce: public Form1() { InitializeComponent(); this.radMaskedEditBox1.Mask = "00,000-000"; this.radMaskedEditBox1.MaskType = Telerik.WinControls.UI.MaskType.Standard; } private void radButton1_Click(object sender, EventArgs e) { radMaskedEditBox1.Value = null; } Workaround: private void radButton1_Click(object sender, EventArgs e) { radMaskedEditBox1.Value = null; radMaskedEditBox1.Text = ""; }
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 = "";
ADD. RadDateTimePicker - add toggle state changed event for the check box
ADD. Popup control which can host controls and be associated with a button or opened on request.
To reproduce: - add a RadButton and a RadTimePicker; - on RadButton.Click dispose the existing RadTimePicker and create a new one; - continue clicking for a while and notice that memory consumption is rising.
To reproduce: - Add two RadTextBoxControls to a blank form. - Double click the one that does not contain the focus with the right mouse button. Workaround: radTextBoxControl1.CaretIndex = 0;
To reproduce: 1. Add RadDateTimePicker and set these properties: this.radDateTimePicker1.ReadOnly = true; this.radDateTimePicker1.ShowCheckBox = true; 2. When run the project you will see that the checkbox is not read only. Workaround: RadCheckBoxElement checkboxelement = this.radDateTimePicker1.DateTimePickerElement.CheckBox; checkboxelement.ReadOnly = true;
To reproduce: - Set the ShowCheckBox property to true and Checked property to false at design-time. - When the application is started the checkbox is checked. Workaround: - Set the state in code: radDateTimePicker1.Checked = false;
Expose the AutoCompleteDropDown so it's behavior can be customized and the user can subscribe to its events for example.
To reproduce: add a RadTreeView and a timer. Use the following code: BindingList<Item> list = new BindingList<Item>(); public Form1() { InitializeComponent(); this.radTreeView1.TreeViewElement.CreateNodeElement += TreeViewElement_CreateNodeElement; for (int i = 0; i < 10; i++) { list.Add(new Item(Guid.NewGuid().ToString(), "Node" + i)); } this.radTreeView1.DataSource = list; this.radTreeView1.DisplayMember = "Title"; this.radTreeView1.ValueMember = "UniqueIdentifier"; this.radTreeView1.TreeViewElement.AutoSizeItems = true; this.timer1.Start(); } void TreeViewElement_CreateNodeElement(object sender, Telerik.WinControls.UI.CreateTreeNodeElementEventArgs e) { e.NodeElement = new CustomTreeNodeElement(); } public class Item: System.ComponentModel.INotifyPropertyChanged { public Item(string uniqueIdentifier, string title) { this._uniqueIdentifier = uniqueIdentifier; this._title = title; } public string UniqueIdentifier { get { return this._uniqueIdentifier; } set { this._uniqueIdentifier = value; OnPropertyChanged("UniqueIdentifier"); } } public string Title { get { return this._title; } set { this._title = value; OnPropertyChanged("Title"); } } public event PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanged(string propertyName) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } private string _uniqueIdentifier; private string _title; } public class CustomContentElement : TreeNodeContentElement { StackLayoutElement nodeContentContainer; LinePrimitive lineElement; LightVisualElement idElement; RadTextBoxControlElement textBoxElement; protected override Type ThemeEffectiveType { get { return typeof(TreeNodeContentElement); } } protected override void InitializeFields() { base.InitializeFields(); this.Margin = new Padding(5, 5, 5, 5); this.StretchHorizontally = true; } public override void Synchronize() { this.DrawFill = true; TreeNodeElement treeNodeElement = this.NodeElement; RadTreeNode node = treeNodeElement.Data; Item dataItem = (Item)node.DataBoundItem; if (dataItem != null) { this.idElement.Text = string.Empty + dataItem.UniqueIdentifier; this.textBoxElement.Text = string.Empty + dataItem.Title; } } protected override void CreateChildElements() { nodeContentContainer = new StackLayoutElement(); nodeContentContainer.Orientation = Orientation.Vertical; nodeContentContainer.StretchHorizontally = true; nodeContentContainer.StretchVertically = false; idElement = new LightVisualElement(); idElement.ShouldHandleMouseInput = false; idElement.NotifyParentOnMouseInput = true; idElement.StretchVertically = false; this.nodeContentContainer.Children.Add(idElement); lineElement = new LinePrimitive(); lineElement.BackColor = Color.Black; lineElement.Margin = new Padding(10, 0, 10, 0); lineElement.StretchVertically = false; this.nodeContentContainer.Children.Add(lineElement); textBoxElement = new RadTextBoxControlElement(); textBoxElement.TextChanged += textBoxElement_TextChanged; textBoxElement.Margin = new Padding(20, 3, 20, 3); textBoxElement.StretchVertically = false; this.nodeContentContainer.Children.Add(textBoxElement); this.Children.Add(nodeContentContainer); } private void textBoxElement_TextChanged(object sender, EventArgs e) { RadTextBoxControlElement tb = sender as RadTextBoxControlElement; CustomContentElement contentElement = tb.Parent.Parent as CustomContentElement; Item item = contentElement.NodeElement.Data.DataBoundItem as Item; if (item.Title != tb.Text) { item.Title = tb.Text; } } } public class CustomTreeNodeElement : TreeNodeElement { protected override TreeNodeContentElement CreateContentElement() { return new CustomContentElement(); } protected override Type ThemeEffectiveType { get { return typeof(TreeNodeElement); } } } private void timer1_Tick(object sender, EventArgs e) { foreach (Item item in list) { item.Title = "Node " + DateTime.Now.ToLongTimeString(); } }
When you have a GridViewDateTimeColumn in the RadGridView and enter in edit mode, you are allowed to clear the current date (set it to null) pressing the Clear button in the popup calendar. However, this functionality is not available in the RadDateTimePicker control. Workaround: public Form1() { InitializeComponent(); this.radDateTimePicker1.NullText = "Empty"; RadDateTimePickerCalendar calendarBehavior = this.radDateTimePicker1.DateTimePickerElement.GetCurrentBehavior() as RadDateTimePickerCalendar; calendarBehavior.Calendar.ShowFooter = true; calendarBehavior.Calendar.ClearButton.Click += ClearButton_Click; } private void ClearButton_Click(object sender, EventArgs e) { this.radDateTimePicker1.DateTimePickerElement.SetToNullValue(); }