Repro-steps
Expected behavior
Observed behavior
Extra info
If the first column is of another type (like GridViewDecimalColumn) a DataError occurs (because "System.IO.MemoryStream" cannot be parces to a decimal).
Searching for a workaround for a previously reported bug, in walked into a little thing:
private void SelectAllCells()
{
GridViewRowInfoEnumerator rowInfoEnumerator = new GridViewRowInfoEnumerator((IHierarchicalRow) this.GridViewElement.Template);
List<GridViewCellInfo> gridViewCellInfoList = new List<GridViewCellInfo>();
this.MasterTemplate.SelectedCells.BeginUpdate();
this.MasterTemplate.SelectedCells.Clear();
while (rowInfoEnumerator.MoveNext())
{
GridViewRowInfo current = rowInfoEnumerator.Current;
if (current.CanBeSelected)
{
foreach (GridViewCellInfo cell in current.Cells)
this.MasterTemplate.SelectedCells.Add(cell);
}
}
this.MasterTemplate.SelectedCells.EndUpdate(true);
}
I am rewriting the RadGridViewPaste-mechanism. Therefor I want to call PastingCellClipboardContent-event using the EventDispatcher.CellClipboardPaste. therefor I need the class GridViewCellValueEventArgs. It has two constructors:
The second constructor is marked as Internal, not Public.
Request: Can this constructor be made Public?
1. Set ThemeResolutionService.AllowAnimations = false;
2. Run the attached project and set a filter via the GridFilterButton popup
3. Click "Clear filter" option in the GridFilterButton popup
You will see that the GirdFilterButton visual indication is of an applied filter. However, there is no applied filter.
ThemeResolutionService.ApplicationThemeName = "Office2019Dark";
this.radDropDownList1.EnableAlternatingItemColor = true;
Please run the attached sample project, open the drop down and press the down arrow key.
Observed: application hangs
Expected: since all menu items in the drop down are disabled, nothing is expected to happen. However, the application shouldn't hangs.
Workaround:
public class CustomRadDropDownButtonElement : RadDropDownButtonElement
{
protected override Type ThemeEffectiveType
{
get
{
return typeof(RadDropDownButtonElement);
}
}
protected override RadDropDownButtonPopup CreateDropDown()
{
return new CustomDropDown(this);
}
}
public class CustomDropDown : RadDropDownButtonPopup
{
public CustomDropDown(RadElement ownerElement) : base(ownerElement)
{
}
protected override void EnsureItemEnabled(RadItem item, bool isUp)
{
do
{
item = this.GetNextItem(item, !isUp);
if (item == this.Items.Last())
{
break;
}
} while (!item.Enabled);
if (item != null)
{
this.SelectItem(item);
}
}
}
HI,
Exploring the Demo Winforms FilterView component a bug is present.
When you expand several categories ,the automatic Vertical Scroll bar is showed but the "Maximum" property value is wrong.
You can't see all the items inside. Some items are hidden at bottom.
But if you collapse some category the new "Maximum" values takes the right previous value before collapsing showing more space as expected
I have a workaround to prevent this situation calling CategoryExpandedChanged event.
Firstly I need to call Application.DoEvents() in order to resizing internally by the component all the StackLayoutPanels connaining the Category Items
After that, I call the private method UpdateScrollBars (Suggested by support) and the ScrollBar takes the right size for its content.
Now I can show all the contained items inside the FilterView panel.
FRC
public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
public RadForm1()
{
InitializeComponent();
DataTable dt = new DataTable();
for (int i = 0; i < 20; i++)
{
dt.Columns.Add("col" + i, typeof(string));
}
for (int i = 0; i < 10; i++)
{
DataRow r = dt.NewRow();
foreach (DataColumn col in dt.Columns)
{
r[col.ColumnName] = Guid.NewGuid().ToString();
}
dt.Rows.Add(r);
}
this.radFilterView1.DataSource = dt;
}
private void radFilterView1_CategoryCreated(object sender, Telerik.WinControls.UI.FilterView.FilterViewCategoryCreatedEventArgs e)
{
e.Category.ExpandedChanged += Category_ExpandedChanged;
e.Category.Expanded = false;
}
private void Category_ExpandedChanged(object? sender, EventArgs e)
{
// You need pass the control to Windows main loop to perform the pending telerik events after property Expanded change in order to resize internally
// the StackLayoutPanel Containers before calling UpdateScrollBars
Application.DoEvents();
// Now your code
MethodInfo mi = typeof(RadFilterViewElement).GetMethod("UpdateScrollbars", BindingFlags.Instance | BindingFlags.NonPublic);
mi.Invoke(this.radFilterView1.FilterViewElement, new object[] { this.radFilterView1.FilterViewElement.ElementsPanel.Size });
// Hide the horizontal scrolll bar
radFilterView1.FilterViewElement.HorizontalScrollBar.Visibility =ElementVisibility.Collapsed;
}
}
Use a custom font set like this:
this.radSyntaxEditor1.SyntaxEditorElement.EditorFontFamily = new Telerik.WinControls.SyntaxEditor.UI.FontFamily("Cascadia Code");
this.radSyntaxEditor1.SyntaxEditorElement.EditorFontSize = 13;
Then load a large document, at least 10K lines so that the clipping is visible.
The solution in this KB article is used: https://docs.telerik.com/devtools/winforms/knowledge-base/clickonce-application-is-broken
Follow the steps:
1. Set your main monitor to be with higher than 100% DPI scaling (e.g. 175%, 200%)
2. Set the secondary monitor with 100% DPI scaling.
3. Run the exe from the project on the secondary monitor with 100% DPI scaling. You will notice that all controls that host the standard MS TextBox are incorrectly scaled:
Setting the SyntaxEditorElement.HorizontalScrollBar.Visibility property to Collapsed indeed hides the horizontal scrollbar but it is still measured and arranged and overlaps the view if you shrink the view:
How to reproduce:
Add a webcam control to the form and set its ControlPanelHeight property. Close the designer and try to open it. Visual Studio crashes and closes.
While working with the Ribbon in a RadRibbonForm, I inadvertently removed a ribbon tab. I started recreating the ribbon tab I removed (and all of the child objects). When I got to creating and naming a ribbon button, it notified me that a control with that name already existed. It appeared that child objects, of the ribbon tab I removed, had not been removed from the form.
I tried to select the existing control from the pull-down on the top of the properties window (to find a way to remove it) and Visual Studio 2022 crashed to desktop. I hadn't saved the form I was working on, so it's mostly messed up in the project (the UI is missing), and I will have to delete what is there and start over.
When saving the layout of RadDock with SaveToXml, the scaled value of SplitterWidth is saved in high DPI.
The non-scaled value should be saved.
The Telerik UI for WinForms installation puts a system assembly into the GAC folder which breaks a third-party tool that depends on the same assembly.