When using the AnchorStyles property, the editor does not update the anchors as expected:
The default MS ContextMenuStrip shows tooltips for disabled menu items:
1. Select two or more cells.
2. Click on the "All charts" button
3. The charts are not displayed and the following error occurs:
Auto-complete items overlap in the VisualStudio2022 theme:
We are using the DropDownButtonElement on a RibbonBar, there are a very frustating issue with the RadArrowButtonElement.
On this image it show 5 children, but on code there are 6 children, here is a CopyPase of your CreateChildElements in RadArrowButtonElement.
protected override void CreateChildElements()
{
arrow = new ArrowPrimitive(ArrowDirection.Down);
arrow.Class = "RadArrowButtonArrow";
arrow.AutoSize = false;
arrow.Alignment = System.Drawing.ContentAlignment.MiddleCenter;
overflowArrow = new OverflowPrimitive(ArrowDirection.Down);
overflowArrow.Class = "RadArrowButtonOverflowArrow";
overflowArrow.AutoSize = false;
overflowArrow.Alignment = System.Drawing.ContentAlignment.MiddleCenter;
overflowArrow.Visibility = ElementVisibility.Collapsed;
fillPrimitive = new FillPrimitive();
fillPrimitive.Class = "RadArrowButtonFill";
fillPrimitive.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize;
borderPrimitive = new BorderPrimitive();
borderPrimitive.Class = "RadArrowButtonBorder";
borderPrimitive.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize;
imagePrimitive = new ImagePrimitive();
imagePrimitive.Class = "RadArrowButtonImage";
imagePrimitive.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize;
imagePrimitive.Alignment = System.Drawing.ContentAlignment.MiddleCenter;
textPrimitive = new TextPrimitive();
textPrimitive.Class = "RadArrowButtonTextGlyph";
textPrimitive.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize;
textPrimitive.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
textPrimitive.StretchHorizontally = true;
textPrimitive.StretchVertically = true;
Children.Add(fillPrimitive);
Children.Add(borderPrimitive);
Children.Add(arrow);
Children.Add(overflowArrow);
Children.Add(imagePrimitive);
Children.Add(textPrimitive);
}
The problem is that we are changing the ArrowButton size to (6, 0) width, here is the how it looks:
As you can see the triangle is outside the ArrowButton, my first idea was to look the ArrowPrimitive and OverflowPrimitive, but that triangle is on TextPrimitive.
Making this change on RadDropDownButtonElement i was able to "solve" the offset and the size.
base.ArrowButton.TextPrimitive.Font = new Font(base.ArrowButton.TextPrimitive.Font.FontFamily, 6);
I have to comment this to something like: "I dont know why this works, but the triangle is on a child text primitive... So don't erase this line".
When Telerik UI for WinForms / WPF extensions are installed, Visual Studio is unresponsive for a couple of minutes after a solution is loaded. During that time, "Updating source control status…" is shown.
Workarounds:
Setting the Title property should update the header text:
this.radPageViewPage1.Title = "test";
Currently, RadPdfViewer offers the DataError event which is purposed to handle errors during the import process. However, if there are problematic pages that are rendered in the viewer at a later moment after the document is already imported, the viewer doesn't offer a suitable way for handling such problematic moments even though the PdfProcessing library throws one of its exceptions.
The exact client's case is loading a PDF document which contains images requiring JPX Decoder which is currently not supported. Even though the PdfProcessing library throws internally the following error, the RadPdfViewer control doesn't throw the DataError event with the respective error:
Telerik.Windows.Documents.Fixed.Exceptions.NotSupportedFilterException: 'JPXDecode is not supported.'
Hi Team,
I would like to request to add a Today button to the RadDateTimePicker so when the user clicks on it, the value of the RadDateTimePicker will be set to the current day/time.
Thank you!
This bug is about a mismatch between what behaviour is expected (on a functional level) and the actual behavior. There are different scenario's:
int index = myRadGridView.Rows.Add(1, 2, 3);
Actual and expected behavior
Adds a row to the grid, filling cells with the values 1, 2 and 3. Even when there are more columns than values, only the first 3 cells are filled.
int index = myRadGridView.Rows.Add(); // Will result in: myRadGridView.Rows.Add(new object[0]);
Actual behavior
IndexOutOfRangeException is thrown.
Expected behavior
A new row is added, the cells are not filled with anything, since it should not matter if 3, 4 or zero values are added to the cells. Or, if you are very strict, an ArgumentOutOfRangeException, telling us at least 1 value is required.
Remark
Of course there is also a NewRow() method. But that is no reason Add() should not be allowed to accept zero values.
int index = myRadGridView.Rows.Add((object[])null);
Actual behavior
A NullReferenceException is thrown.
Expected behavior
ArgumentNullException, telling us that parameter "values" is not allowed to be null.
int index = myRadGridView.Rows.Add(new GridViewDataRowInfo(...), new GridViewDataRowInfo(...));
// or
int index = myRadGridView.Rows.Add(new object[] { new GridViewDataRowInfo(...), new GridViewDataRowInfo(...) });
Actual behavior
Only the first row is added. The second row, or even the second value (integer, string, whatever) is totally ignored.
Expected behavior
Remark
The method Add(params object[] values) checks if the first value is a row, resulting in this and the previous bugs.
Repro-steps
Actual behavior
The value contains a string representing the formatted and rounded value of the average of all values.
Expected behavior
The value contains a raw, not rounded, not formatted, decimal value.
Remarks
I expect this behavior since GridSummaryCellElement has two properties: Text and Value.
I expect those to have difference functions. Value to hold the actual calculated value, and Text to hold the formatted, round string-equivalent.
Another reason why I expect this, is that Value is of type object, not of type string. So expect a value corresponding to the original datatype of the column and/or the result of the calculation.
Follow-up questions
With releasing .NET 6, there are TimeOnly and DateOnly types which would be more appropriate for managing such values:
https://devblogs.microsoft.com/dotnet/date-time-and-time-zone-enhancements-in-net-6/
It would be good to add support for these types in GridViewDateTimeView.
Currently, the following code gives an exception when entering edit mode:
public RadForm1()
{
InitializeComponent();
DataTable dt = new DataTable();
dt.Columns.Add("DateOnly", typeof(DateOnly));
dt.Rows.Add(new DateOnly(2022,3,3));
this.radGridView1.AutoGenerateColumns = false;
GridViewDateTimeColumn dateColumn = new GridViewDateTimeColumn();
dateColumn.FieldName = "DateOnly";
this.radGridView1.Columns.Add(dateColumn);
this.radGridView1.DataSource = dt;
this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
}
Workaround: you can use the following custom TypeConverter:
public RadForm1()
{
InitializeComponent();
DataTable dt = new DataTable();
dt.Columns.Add("DateOnly", typeof(DateOnly));
dt.Rows.Add(new DateOnly(2022,3,3));
this.radGridView1.AutoGenerateColumns = false;
GridViewDateTimeColumn dateColumn = new GridViewDateTimeColumn();
dateColumn.DataType = typeof(DateTime);
dateColumn.FieldName = "DateOnly";
dateColumn.Format = DateTimePickerFormat.Custom;
dateColumn.CustomFormat = "dd/MM/yyyy";
dateColumn.FormatString = "{0:dd/MM/yyyy}";
dateColumn.DataTypeConverter = new DateOnlyConverter();
this.radGridView1.Columns.Add(dateColumn);
this.radGridView1.DataSource = dt;
this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
}
public class DateOnlyConverter : TypeConverter
{
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
{
return destinationType == typeof(DateTime);
}
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
{
if (value is DateOnly && destinationType == typeof(DateTime))
{
DateOnly date = (DateOnly)value;
return new DateTime(date.Year, date.Month, date.Day);
}
return base.ConvertTo(context, culture, value, destinationType);
}
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
{
return sourceType == typeof(DateTime) ;
}
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
{
if (value is DateTime)
{
DateTime date = (DateTime)value;
return new DateOnly(date.Year, date.Month, date.Day);
}
return base.ConvertFrom(context, culture, value);
}
}