Use the following code snippet:
Sub New()
InitializeComponent()
Me.RadCheckedDropDownList1.ShowCheckAllItems = True
Me.RadCheckedDropDownList1.AutoSizeItems = True
For x = 1 To 20
Dim i As New DescriptionTextCheckedListDataItem
i.Value = x
i.Text = x.ToString()
i.DescriptionText = "abc def ghijkl mnop abc def ghijkl mnop" & x
Me.RadCheckedDropDownList1.Items.Add(i)
Next
End Sub
Open the popup, scroll to the bottom and then back to the top.
Expected: The CheckAllItem is visible
Actual: The CheckAllItem is hidden
Hello
In RadCheckedDropDownList, We are using 'TelerikMetroBlue' theme. When we select multiple items in dropdownlist, its creating issue in rendering items in TextBlock. Selected items are coming on top of DropDownListElement ArrowButton, I can't see arrow button clearly due to items in background. If i use another theme then its working fine but i have to use 'TelerikMetroBlue' theme. please find attached.
Please advise.
Please follow the steps:
1. Create a brand new project and add a RadCheckedDropDownList on the form.
2. Add two items:
3. Open the Element hierarchy editor and set the Alignment property to the below element:
This is the serialized code in the Designer.cs:
this.radCheckedDropDownList1.Items.Add(radCheckedListDataItem1);
this.radCheckedDropDownList1.Items.Add(radCheckedListDataItem2);
this.radCheckedDropDownList1.Location = new System.Drawing.Point(13, 13);
this.radCheckedDropDownList1.Name = "radCheckedDropDownList1";
this.radCheckedDropDownList1.Size = new System.Drawing.Size(218, 20);
this.radCheckedDropDownList1.TabIndex = 0;
((Telerik.WinControls.UI.TextBlockElement)(this.radCheckedDropDownList1.GetChildAt(0).GetChildAt(2).GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(0))).Alignment = System.Drawing.ContentAlignment.MiddleCenter;
((Telerik.WinControls.UI.TextBlockElement)(this.radCheckedDropDownList1.GetChildAt(0).GetChildAt(2).GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(0))).MinSize = new System.Drawing.Size(0, 16);
((Telerik.WinControls.UI.TextBlockElement)(this.radCheckedDropDownList1.GetChildAt(0).GetChildAt(2).GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(0))).MaxSize = new System.Drawing.Size(0, 16);
4. Save the changes and run the project. As a result you will get an exception since the TextBlockElement is not created yet. It either shouldn't be serialized or not be available in the UI editor.
In this case, we have the following structure added dynamically.
RadPanel -> RadPanel -> RadScrollViewer -> StackLayoutPanel -> GridLayout -> RadCheckedDropDownList on each row.
When the form is moved to monitor with higher resolution, the RadCheckedDropDownList is not rendered correctly. Only the first row in the GridLayout is scaled.
As a workaround, we could call the InvalidateMeasure and UpdateLayout methods when the Dpi is changed.
RadPanel
RadPanel (second panel).RootElement.DpiScaleFactorChanged += RootElement_DpiScaleFactorChanged;
private void RootElement_DpiScaleFactorChanged(object sender, EventArgs e)
{
var gridLayout = (sender as RootRadElement).FindDescendant<GridLayout>();
gridLayout.InvalidateMeasure(true);
gridLayout.UpdateLayout();
}