Background: With many people having moved to working remotely, collaboration is a much larger part of any enterprise applications. As such, it would be highly beneficial to add real time collaboration capabilities to editor controls, more specifically the RadRichTextEditor control. It would work similarly to how MS Word works when more than one user is editing a document at the same time.
Scenario: Assume you have and WinForms application where there is a form that contains a RadRichTextEditor. The content for this control is populated from a centralized database. This content is editable by users of the application. Lets say that you have two users (User A and User B) editing this content at the same time. Currently, User A cannot see what User B is doing in real-time, and vice-versa. Each time one of the users saves the content, it will overwrite any changes made by the other user.
Desired outcome: If the users in the above scenario are using MS Word, each user would see that someone else is currently editing the document and the other user's changes would be displayed in real-time. This same outcome should be made more readily available with the Telerik editors, primarily the RadRichTextEditor, so that when two users are editing the same content, they would see each others' changes in real-time.
I know this is possible using SignalR and a bit of code, but I think it would be beneficial for the RadRichTextEditor to have better "out of the box" support for this feature.
I am aware of a web-based control that has this feature. Specifically, the CKEditor (https://ckeditor.com/) control has the features I am requesting. However, I am looking at WinForms as opposed to web.
To reproduce the issue, just drag a RadToggleSwitch to the form. Then, at run time call the method:
radToggleSwitch1.SetToggleState(newValue: false, animate: false);
You will notice that the colors are changed but the thumb is not moved:
Workaround:
this.radToggleSwitch1.AllowAnimation = false;
this.radToggleSwitch1.Toggle();
After installing R3 2022, the QuickStart example can't be run:
The Control Panel offers a way to reset your password by navigating you to https://www.telerik.com/registration-login/forgotten-password?utm_source=tcp
Currently, RadGridView offers GridViewImageColumn. However, it would be good to offer support for SVG images out of the box.
One possible approach is to introduce a new property for the GridViewImageColumn - ImageDrawType = ImageDrawType.Svg that controls what kind of images this column will store.
Second approach is to introduce a new GridViewSvgImageColumn.
The ChartLegendElement displays the legend items in a StackLayoutElement which can be either vertical or horizontal.
public RadForm1()
{
InitializeComponent();
Random rand = new Random();
List<LineSeries> list = new List<LineSeries>();
for (var index = 1; index <= 15; index++)
{
LineSeries ls = new LineSeries();
ls.LegendTitle = "Series " + index;
list.Add(ls);
}
for (int index = 1; index <= 100; index++)
{
foreach (LineSeries s in list)
s.DataPoints.Add(new CategoricalDataPoint(index, rand.Next(0, rand.Next(5, 20))));
}
this.radChartView1.Series.AddRange(list.ToArray());
this.radChartView1.ShowLegend = true;
this.radChartView1.ChartElement.LegendPosition = LegendPosition.Bottom;
this.radChartView1.ChartElement.LegendElement.StackElement.Orientation = Orientation.Vertical;
}
Horizontal:
Vertical:
It would be good to provide an option for wrapping the legend items:
Workaround: use an appropriate container for the legend items to wrap the legend item and use the space more efficiently
https://docs.telerik.com/devtools/winforms/knowledge-base/chartview-wrap-legend-items
The method GridViewTemplate.SetError creates in most situations an GridViewDataErrorEventArgs object twice.
Current code:
GridViewDataErrorEventArgs args = new GridViewDataErrorEventArgs(exception, 0, 0, GridViewDataErrorContexts.Commit);
if (e != null)
{
args = new GridViewDataErrorEventArgs(exception, e.ColumnIndex, e.RowIndex, GridViewDataErrorContexts.Commit);
}
In assume in most cases e will not be null, so in must cases the first args will be removed. This has a small negative impact on memory and performace.
Suggestion:
GridViewDataErrorEventArgs args = e == null
? new GridViewDataErrorEventArgs(exception, 0, 0, GridViewDataErrorContexts.Commit)
: new GridViewDataErrorEventArgs(exception, e.ColumnIndex, e.RowIndex, GridViewDataErrorContexts.Commit);
This is about the following method:
public void SetError(GridViewCellCancelEventArgs e, Exception exception)
{
GridViewDataErrorEventArgs args = new GridViewDataErrorEventArgs(exception, 0, 0, GridViewDataErrorContexts.Commit);
if (e != null)
{
args = new GridViewDataErrorEventArgs(exception, e.ColumnIndex, e.RowIndex, GridViewDataErrorContexts.Commit);
}
this.EventDispatcher.RaiseEvent<GridViewDataErrorEventArgs>(EventDispatcher.DataError, this, args);
if (args.ThrowException)
{
throw args.Exception;
}
if (args.Cancel)
{
//TODO: cancel row edit
}
}
Right now, the method GridViewTemplate.SetError accepts a parameter of type GridViewCellCancelEventArgs, which in itself is weird, because event args should only be used inside events and OnXXX-methods. But since SetError fires an event, one could argue that this method is like a OnXXX-method.
But inside it becomes more weird, it translates GridViewCellCancelEventArgs into GridViewDataErrorEventArgs. And I must admit, the last DataError-args feel a lot more logical that CellCancel-args when firing setting an error. Furthermore, if I create an override of class GridViewCellCancelEventArgs to contain more data about an error, this information never reaches the event handlers.
So why this translation? Or better: Why this parameter?
My suggestion would be to make a new overload:
public void SetError(GridViewDataErrorEventArgs e)
{
if (e == null)
throw new ArgumentNullException(nameof(e));
this.EventDispatcher.RaiseEvent<GridViewDataErrorEventArgs>(EventDispatcher.DataError, this, args);
if (args.ThrowException)
throw args.Exception;
if (args.Cancel)
{
// TODO: I really do not know what telerik wanted to do here, so I live this up to Telerik.
}
}
Repro-steps
Expected behavior
Observed behavior
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).
To replicate the missing button when the application is run on my main monitor with 150% DPI scaling:
If the RadControl.EnableRadAutoScale property is set to false in the Program.cs file, the button is placed as expected:
When I replace the form to inherit from RadForm, not the MS Form, the button is clipped:
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);
}