Unplanned
Last Updated: 27 Jun 2022 11:31 by Dinko
Created by: Dinko
Comments: 0
Category: SyntaxEditor
Type: Feature Request
0
Currently, you search in the entire document. Add options like in the Visual Studio or Notepad++ to choose where to search and replace. Those options should be in the entire document (like the default behavior) or the current selection. 
Unplanned
Last Updated: 27 Jun 2022 05:42 by Suresh

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);
        }
    }
}

Unplanned
Last Updated: 22 Jun 2022 12:13 by Iprel

Follow the code:

    internal static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            RadControl.EnableRadAutoScale = true;
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);


            string text = "Are you sure you want to exit?";
            string caption = "Application";
            RadMessageIcon icon = RadMessageIcon.Question;
            RadMessageBox.Show(text, caption, MessageBoxButtons.YesNo, icon);

            RadMessageBox.Show(text, caption, MessageBoxButtons.YesNoCancel, icon); 
       

When the application is run on a main monitor with 125% DPI scaling, the following result is observed:

Workaround: 

RadControl.EnableRadAutoScale = false;

Unplanned
Last Updated: 22 Jun 2022 06:30 by Philip

The ChangeFontStyle method does not work when setting Underline: 

 

radRichTextEditor1.ChangeFontStyle( FontStyle.Underline);

 

Workaround:

radRichTextEditor1.ToggleUnderline();

Unplanned
Last Updated: 21 Jun 2022 05:43 by Jean-Pierre

VS 2022, Telerik 2022.2.510, NET 6.0 (sample app is attached)

1. Creating sample Telerik WinForms App.
2. Add a RadTextBox
3. Load Event with code
radTextBox1.Text = this.Size.ToString();

4. Run the App
5. Close the App
6. Move the RadTextBox Control at design time.
In design, the height of the form is 2 pixels taller.
Run these steps in a loop. After a few hours of work, the form exceeds the size of the screen.

In Development
Last Updated: 17 Jun 2022 10:11 by ADMIN
The wrap text feature does not work as expected when not in edit mode
Completed
Last Updated: 17 Jun 2022 07:38 by ADMIN
Release R2 2022 SP1
Unplanned
Last Updated: 14 Jun 2022 12:09 by Katrina
When the definition of font-weight contains a CSS variable as a value for the property, NullReferenceException is thrown while importing the content.
Completed
Last Updated: 10 Jun 2022 09:30 by ADMIN
Release R2 2022 SP1

To recreate the problem:

1. Create a new Telerik Winforms .Net Project
2. Add a radButton
3. Change the font property in the designer to a different size

Workaround: change the font for the TextPrimitive:

Unplanned
Last Updated: 10 Jun 2022 08:53 by Todd

Add a RadTimePicker to your project and select new time from the popup.

Expected: The clock element inside the popup should be updated accordingly to the newly set value.

Actual: The clock element remains unchanged. It is necessary to close and open the popup again.

Workaround:

        private void RadTimePicker1_ValueChanged(object sender, EventArgs e)
        {
            this.radTimePicker1.TimePickerElement.PopupContentElement.ClockElement.Value = this.radTimePicker1.Value;
        }

Completed
Last Updated: 10 Jun 2022 08:46 by ADMIN
Release R2 2022 SP1

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;
        }

    }

Completed
Last Updated: 10 Jun 2022 08:44 by ADMIN
Release R2 2022 SP1

Use the following code snippet

        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;
        }

 

You will notice that after running the project, the vertical scrollbar is missing:

Workaround:

        protected override void OnShown(EventArgs e)
        {
            base.OnShown(e); 
            MethodInfo mi = typeof(RadFilterViewElement).GetMethod("UpdateScrollbars", BindingFlags.Instance | BindingFlags.NonPublic);
            mi.Invoke(this.radFilterView1.FilterViewElement, new object[] { this.radFilterView1.FilterViewElement.ElementsPanel.Size });
        }

An extended workaround that covers the case for updating the scrollbar at run time is demonstrated here:

        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;
        }
 

Completed
Last Updated: 10 Jun 2022 08:04 by ADMIN
Release R2 2022 SP1
When DetailsView is set from the drop-down, the Date Modified column is not updated. For example, if the dialog is opened at a specific place and we modified a file (edit, replace) from an external place (source), Date Modified does not reflect the changed date.
Completed
Last Updated: 10 Jun 2022 06:53 by ADMIN
Release R2 2022 SP1
Created by: Martin
Comments: 0
Category: BindingNavigator
Type: Bug Report
0

Follow the article to create a sample project:

https://docs.telerik.com/devtools/winforms/controls/bindingnavigator/getting-started 

You will notice that the navigator remains empty.

Workaround:

    Sub New() 
        InitializeComponent()

        Me.CommandBarButton1.Name = "MoveFirstItem"
        Me.CommandBarButton2.Name = "MovePreviousItem"
        Me.CommandBarTextBox1.Name = "PositionItem"
        Me.CommandBarLabel1.Name = "CountItem"
        Me.CommandBarButton3.Name = "MoveNextItem"
        Me.CommandBarButton4.Name = "MoveLastItem"
        Me.CommandBarButton5.Name = "AddNewItem"
        Me.CommandBarButton6.Name = "DeleteItem"
        Me.CommandBarStripElement2.DisplayName = "SecondStrip"
        Me.CommandBarStripElement1.DisplayName = "FirstStrip"

    End Sub

Completed
Last Updated: 09 Jun 2022 12:17 by ADMIN
Release R2 2022 SP1

Use the following code: 

        public RadForm1()
        {
            InitializeComponent();

                        // This XML contains a simple tree with a root node having 3 children, the first of which is intended to be Bold
            var xml = "<TreeView xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" MultiSelect=\"true\" AllowDragDrop=\"true\" LabelEdit=\"true\" AllowDrop=\"true\">  <Nodes Text=\"New Package\" Expanded=\"true\" ImageKey=\"Package\" Font=\"Microsoft Sans Serif, 8.25pt, style=Bold\">    <Tag xsi:type=\"xsd:string\">&lt;Info&gt;&lt;FullName&gt;\\New Package&lt;/FullName&gt;&lt;ObjectType&gt;Package&lt;/ObjectType&gt;&lt;IsRunnable&gt;False&lt;/IsRunnable&gt;&lt;IsContainer&gt;true&lt;/IsContainer&gt;&lt;/Info&gt;</Tag>    <Nodes Text=\"Query Engine\" ImageKey=\"QueryEngine\" Expanded=\"true\" Font=\"Microsoft Sans Serif, 8.25pt, style=Bold\">      <Tag xsi:type=\"xsd:string\">&lt;Info&gt;&lt;FullName&gt;\\Query Engine&lt;/FullName&gt;&lt;ObjectType&gt;QueryEngine&lt;/ObjectType&gt;&lt;IsRunnable&gt;true&lt;/IsRunnable&gt;&lt;IsTableEntity&gt;true&lt;/IsTableEntity&gt;&lt;IsCut&gt;false&lt;/IsCut&gt;&lt;/Info&gt;</Tag>    </Nodes>    <Nodes Text=\"Connector\" ImageKey=\"Irion.SQLServer\">      <Tag xsi:type=\"xsd:string\">&lt;Info&gt;&lt;FullName&gt;\\Connector&lt;/FullName&gt;&lt;ObjectType&gt;DBConnection&lt;/ObjectType&gt;&lt;IsCut&gt;false&lt;/IsCut&gt;&lt;/Info&gt;</Tag>    </Nodes>    <Nodes Text=\"Connector Link\" ImageKey=\"DatabaseDatalink\">      <Tag xsi:type=\"xsd:string\">&lt;Info&gt;&lt;FullName&gt;\\Connector Link&lt;/FullName&gt;&lt;ObjectType&gt;DatabaseDatalink&lt;/ObjectType&gt;&lt;IsRunnable&gt;true&lt;/IsRunnable&gt;&lt;IsTableEntity&gt;true&lt;/IsTableEntity&gt;&lt;IsCut&gt;false&lt;/IsCut&gt;&lt;/Info&gt;</Tag>    </Nodes>  </Nodes></TreeView>";

            this.radTreeView1.LoadXML(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(xml)));

            //make sure that the following 2 nodes are bold:
            this.radTreeView1.Nodes[0].Nodes[0].Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.radTreeView1.Nodes[0].Nodes[2].Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 0);

            var tvx = this.radTreeView1.TreeViewXml;
        }

The XML returned by the tvx variable is different in 6.0 and 4.7.2. The Font for the node is serialized in 4.7.2:

But the font is missing in 6.0:

 

Completed
Last Updated: 09 Jun 2022 08:39 by ADMIN
Release R2 2022 SP1
Exception when setting transparent texbox editor background
Unplanned
Last Updated: 08 Jun 2022 13:23 by Maciej
Created by: Maciej
Comments: 0
Category: Scheduler/Reminder
Type: Bug Report
6

The local time is EEST — Eastern European Summer Time (Current Offset: UTC/GMT +3 hours). Add an additional time zone IST — India Standard Time (Current Offset: UTC/GMT +5:30 hours). It is expected to show 2 hours and 30 minutes difference between the two times zones. However, it is 1 hour and 30 minutes:

    Public Sub New()
        InitializeComponent()

        allTimeZones = SchedulerTimeZone.GetSchedulerTimeZones()
        Dim mumbai As SchedulerTimeZone = GetSpecificTimeZone("India Standard Time")
        If Not mumbai.Equals(Me.RadScheduler1.GetDayView().DefaultTimeZone) Then
            RadScheduler1.GetDayView().TimeZones.Insert(0, mumbai)
        End If

        Dim utc As SchedulerTimeZone = GetSpecificTimeZone("UTC")
        If Not utc.Equals(Me.RadScheduler1.GetDayView().DefaultTimeZone) Then
            RadScheduler1.GetDayView().TimeZones.Insert(0, utc)
        End If
    End Sub
    Private Function GetSpecificTimeZone(_TimeZoneInformationID As String) As SchedulerTimeZone
        Try
            Dim tempZone As New SchedulerTimeZone((From t In allTimeZones.Where(Function(x) x.TimeZoneInformation.Id Like _TimeZoneInformationID) Select t.TimeZoneInformation).First)
            tempZone.Label = tempZone.TimeZoneInformation.BaseUtcOffset.ToString()
            Return tempZone
        Catch ex As Exception
            Return Nothing
        End Try
    End Function

Actual: 1 hour behind the expected

Expected:

Workaround:

Public Class Form1

    Private allTimeZones As List(Of SchedulerTimeZone)

    Public Sub New()
        InitializeComponent()

        Me.RadScheduler1.ElementProvider = New CustomSchedulerElementProvider(Me.RadScheduler1)


        allTimeZones = SchedulerTimeZone.GetSchedulerTimeZones()
        Dim mumbai As SchedulerTimeZone = GetSpecificTimeZone("India Standard Time")
        If Not mumbai.Equals(Me.RadScheduler1.GetDayView().DefaultTimeZone) Then
            RadScheduler1.GetDayView().TimeZones.Insert(0, mumbai)
        End If

        Dim utc As SchedulerTimeZone = GetSpecificTimeZone("UTC")
        If Not utc.Equals(Me.RadScheduler1.GetDayView().DefaultTimeZone) Then
            RadScheduler1.GetDayView().TimeZones.Insert(0, utc)
        End If
    End Sub
    Private Function GetSpecificTimeZone(_TimeZoneInformationID As String) As SchedulerTimeZone
        Try
            Dim tempZone As New SchedulerTimeZone((From t In allTimeZones.Where(Function(x) x.TimeZoneInformation.Id Like _TimeZoneInformationID) Select t.TimeZoneInformation).First)
            tempZone.Label = tempZone.TimeZoneInformation.BaseUtcOffset.ToString()
            Return tempZone
        Catch ex As Exception
            Return Nothing
        End Try
    End Function
End Class

Public Class CustomSchedulerElementProvider
        Inherits SchedulerElementProvider

        Public Sub New(scheduler As RadScheduler)
            MyBase.New(scheduler)
        End Sub

        Public Overrides Function CreateRulerPrimitive(area As DayViewAppointmentsArea, timeZone As SchedulerTimeZone) As RulerPrimitive
            Dim ruler As RulerPrimitive = MyBase.CreateRulerPrimitive(area, timeZone)
            ruler.RulerRenderer = New CustomRulerRenderer(ruler)
            Return ruler
        End Function
    End Class

Public Class CustomRulerRenderer
    Inherits RulerRenderer


    Public Sub New(ruler As RulerPrimitive)
        MyBase.New(ruler)
    End Sub

    Public Overrides Sub RenderHour(g As IGraphics, hour As Integer, bounds As RectangleF)
        hour += Me.ruler.StartScale + CInt(Math.Ceiling(Me.ruler.DefaultOffset))
        Dim currentTime As DateTime = DateTime.Now.Date.AddHours(hour)
        Dim percent As Single = Me.ruler.DefaultOffset - CSng(Math.Floor(CDbl(Me.ruler.DefaultOffset)))
        Dim x As Integer = Me.ruler.HourLineStartPosition
        Dim y As Single = CSng(Math.Ceiling(bounds.Top + (GetSpecificRange() * bounds.Height) * percent))
        Dim hourText As String = ""

        If Me.ruler.FormatStrings.HoursFormatString IsNot Nothing Then
            hourText = currentTime.ToString(Me.ruler.FormatStrings.HoursFormatString)
        End If

        'Dim args As RulerTextFormattingEventArgs = New RulerTextFormattingEventArgs(hourText, RulerTextFormattingContext.Hour, currentTime)
        'Me.ruler.Scheduler.OnRulerTextFormatting(args)
        'hourText = args.Text
        Dim minutesText As String = ""

        If Me.ruler.FormatStrings.MinutesFormatString IsNot Nothing Then
            minutesText = currentTime.ToString(Me.ruler.FormatStrings.MinutesFormatString)
        End If

        'args = New RulerTextFormattingEventArgs(minutesText, RulerTextFormattingContext.Minute, currentTime)
        'Me.ruler.scheduler.OnRulerTextFormatting(args)
        'minutesText = args.Text
        Dim measuredSize As Size = TextRenderer.MeasureText(hourText, Me.ruler.Font)
        measuredSize = DrawTimeText(g, y, hourText, minutesText, measuredSize)

        If ruler.RightToLeft Then
            g.DrawLine(Me.ruler.HourLineColor, Me.ruler.Bounds.Left, y, Me.ruler.Bounds.Width - x, y, Me.ruler.DpiScaleFactor.Height)
            g.DrawLine(Me.ruler.HourLineShadowColor, Me.ruler.Bounds.Left, y + Me.ruler.DpiScaleFactor.Height, Me.ruler.Bounds.Width - x, y + Me.ruler.DpiScaleFactor.Height, Me.ruler.DpiScaleFactor.Height)
        Else
            g.DrawLine(Me.ruler.HourLineColor, x, y, Me.ruler.Bounds.Width, y, Me.ruler.DpiScaleFactor.Height)
            g.DrawLine(Me.ruler.HourLineShadowColor, x, y + Me.ruler.DpiScaleFactor.Height, Me.ruler.Bounds.Width, y + Me.ruler.DpiScaleFactor.Height, Me.ruler.DpiScaleFactor.Height)
        End If
    End Sub

    Friend Function GetSpecificRange() As Integer
        Return 60 / CInt(Me.ruler.RangeFactor)
    End Function
End Class

Unplanned
Last Updated: 08 Jun 2022 10:05 by Clayton
Created by: Clayton
Comments: 0
Category: UI for WinForms
Type: Bug Report
1
RadRichTextEditor: Memory leak on importing plain text
Unplanned
Last Updated: 08 Jun 2022 08:28 by Prashant
CopyPropertiesFromOverride() method of InlineUIContainer is called more than once for every Copy/Paste command.
Unplanned
Last Updated: 08 Jun 2022 07:52 by Suresh

Use the following code snippet:

        public RadForm1()
        {
            InitializeComponent();
            this.radGridView1.Columns.Add("TextColumn");
            this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

            for (int i = 0; i < 30; i++)
            {
                this.radGridView1.Rows.Add(Guid.NewGuid().ToString());
            }
            this.radGridView1.CellValidating += radGridView1_CellValidating;

            this.radGridView1.EditorManager.CloseEditorWhenValidationFails = false;
        }

        private void radGridView1_CellValidating(object sender, CellValidatingEventArgs e)
        {
            if (e.Value == null || e.Value == "")
            {
                e.Cancel = true;
                RadMessageBox.Show("Value can't be empty!");
            }
        }

Steps:

1. Clear the value of a cell

2. While the editor is active with an empty value, click the vertical scrollbar to trigger scrolling.

Actual: the scrolling is performed and the editor is closed with the previous value no matter when the validation fails and the CloseEditorWhenValidationFails property is set to false.

Expected: the scrolling should be blocked if the validation fails. We should offer the same behavior when scrolling with the mouse wheel, clicking another cell or clicking the vertical scrollbar (or any of its elements).

Workaround: 

        public class MyGrid : RadGridView
        {
            public override string ThemeClassName
            {
                get
                {
                    return typeof(RadGridView).FullName;
                }
            }

            protected override void OnMouseDown(MouseEventArgs e)
            {
                RadScrollBarElement scrollBarAtPoint = GetScrollbarElementAtPoint<RadScrollBarElement>(this.GridViewElement.ElementTree, e.Location) as RadScrollBarElement;
                GridViewEditManager editManager = this.EditorManager;
                if (scrollBarAtPoint != null && this.ActiveEditor != null && !editManager.CloseEditorWhenValidationFails)
                {
                    bool isClosed = editManager.CloseEditor();
                    if (!isClosed)
                    {
                        return;
                    }
                }
                base.OnMouseDown(e);
            }

            internal T GetScrollbarElementAtPoint<T>(RadElementTree componentTree, Point point) where T : RadElement
            {
                if (componentTree != null)
                {
                    RadElement elementUnderMouse = componentTree.GetElementAtPoint(point);

                    while (elementUnderMouse != null)
                    {
                        T item = elementUnderMouse as T;

                        if (item != null)
                        {
                            return item;
                        }

                        elementUnderMouse = elementUnderMouse.Parent;
                    }
                }

                return null;
            }
        }

 

 

1 2 3 4 5 6