Hello everyone,
When I use the RadMenu control Add New Item, after opening a Form1 through the menu item, the interface Form1 is displayed on the display every time
behind the main interface. This is not what I want; I want it to be displayed in front of the main interface.I hope everyone can help me, thank you.
we have the following property:
private Size _picSize = new Size(1272, 787);
public Size PicSize
{
get => _picSize;
set => value;
}
if in the radpropertygrid for this property to remove the height and semicolon, press <enter>, an error occurs:
System.ArgumentException: Не удается разобрать текст "1000". Ожидаемый формат текста: "Width,Height".
в System.Drawing.SizeConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
в Telerik.WinControls.UI.PropertyGridItem.ConvertValue(Object value, Object& convertedValue)
в Telerik.WinControls.UI.PropertyGridItem.set_Value(Object value)
в Telerik.WinControls.UI.PropertyGridTableElement.EndEditCore(Boolean commitChanges)
в Telerik.WinControls.UI.PropertyGridTextBoxEditor.OnLostFocus()

Hi,
I have been trying to make the icon view more of a tile view however when I try and do the back colour it does a gradient fill instead. See attachment
Form Code
this.radListView2.ViewType = ListViewType.IconsView; this.radListView2.ItemSize = new Size(300, 120); this.radListView2.ItemSpacing = 10; this.radListView2.AllowEdit = false; this.radListView2.EnableFiltering = true; this.radListView2.HotTracking = false; this.radListView2.RootElement.BackColor = Color.Transparent; this.radListView2.BackColor = Color.Transparent; this.radListView2.ListViewElement.DrawFill = false; this.radListView2.ListViewElement.ViewElement.BackColor = Color.Transparent; this.radListView2.RootElement.EnableElementShadow = false;}private void radListView2_VisualItemCreating(object sender, ListViewVisualItemCreatingEventArgs e){ if (e.VisualItem is IconListViewVisualItem) { e.VisualItem = new PeopleListIcon(); }}
PeopleListIcon Code
using System;using HRSystem.HRDataCentre;using System.Collections.Generic;using System.Drawing;using System.Reflection;using System.Text;using Telerik.WinControls;using Telerik.WinControls.UI;using System.Linq;using Telerik.WinControls.Layouts;namespace HRSystem.New_Element{ public class PeopleListIcon : IconListViewVisualItem { protected override Type ThemeEffectiveType { get { return typeof(IconListViewVisualItem); } } LightVisualElement RoleName = new LightVisualElement(); LightVisualElement RoleType = new LightVisualElement(); LightVisualElement PersonName = new LightVisualElement(); LightVisualElement Duration = new LightVisualElement(); LightVisualElement Active = new LightVisualElement(); private StackLayoutElement verticalContainer = new StackLayoutElement(); private StackLayoutElement roomHeaderContainer = new StackLayoutElement(); private StackLayoutElement roomFooterContainer = new StackLayoutElement(); protected override void CreateChildElements() { base.CreateChildElements(); verticalContainer.Orientation = System.Windows.Forms.Orientation.Vertical; verticalContainer.NotifyParentOnMouseInput = true; verticalContainer.ShouldHandleMouseInput = false; verticalContainer.StretchHorizontally = true; verticalContainer.StretchVertically = true; roomHeaderContainer.Orientation = System.Windows.Forms.Orientation.Horizontal; roomHeaderContainer.NotifyParentOnMouseInput = true; roomHeaderContainer.ShouldHandleMouseInput = false; roomHeaderContainer.Children.Add(RoleName); roomHeaderContainer.Children.Add(RoleType); roomHeaderContainer.StretchHorizontally = true; RoleName.NotifyParentOnMouseInput = true; RoleName.ShouldHandleMouseInput = false; RoleName.StretchHorizontally = true; RoleName.CustomFont = "Roboto"; RoleName.CustomFontSize = 9; RoleName.CustomFontStyle = FontStyle.Bold; RoleName.Margin = new System.Windows.Forms.Padding(5, 10, 0, 0); RoleName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; RoleType.NotifyParentOnMouseInput = true; RoleType.ShouldHandleMouseInput = false; RoleType.StretchHorizontally = false; RoleType.CustomFont = "Roboto"; RoleType.CustomFontSize = 9; RoleType.CustomFontStyle = FontStyle.Regular; RoleType.Margin = new System.Windows.Forms.Padding(0, 5, 5, 0); roomFooterContainer.Orientation = System.Windows.Forms.Orientation.Horizontal; roomFooterContainer.NotifyParentOnMouseInput = true; roomFooterContainer.ShouldHandleMouseInput = false; roomFooterContainer.StretchHorizontally = true; roomFooterContainer.DrawFill = true; roomFooterContainer.BackColor = Color.White; roomFooterContainer.GradientStyle = GradientStyles.Solid; roomFooterContainer.MinSize = new System.Drawing.Size(0, 30); PersonName.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; PersonName.StretchHorizontally = false; PersonName.Layout.LeftPart.Padding = new System.Windows.Forms.Padding(24, 0, 8, 0); PersonName.Alignment = System.Drawing.ContentAlignment.MiddleCenter; PersonName.NotifyParentOnMouseInput = true; PersonName.ShouldHandleMouseInput = false; PersonName.CustomFont = "Roboto"; PersonName.CustomFontSize = 12; PersonName.CustomFontStyle = FontStyle.Regular; Duration.NotifyParentOnMouseInput = true; Duration.ShouldHandleMouseInput = false; Duration.StretchVertically = true; Active.StretchVertically = true; roomFooterContainer.Children.Add(Duration); roomFooterContainer.Children.Add(Active); Active.NotifyParentOnMouseInput = true; Active.ShouldHandleMouseInput = false; Active.StretchHorizontally = false; Active.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; Active.CustomFont = "Roboto"; Active.CustomFontSize = 9; Active.CustomFontStyle = FontStyle.Regular; Duration.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; Duration.CustomFont = "Roboto"; Duration.CustomFontSize = 9; Duration.CustomFontStyle = FontStyle.Regular; Duration.Margin = new System.Windows.Forms.Padding(5, 0, 0, 0); Duration.StretchHorizontally = false; verticalContainer.Children.Add(roomHeaderContainer); verticalContainer.Children.Add(PersonName); verticalContainer.Children.Add(roomFooterContainer); this.Children.Add(this.verticalContainer); } protected override void SynchronizeProperties() { base.SynchronizeProperties(); this.DrawText = false; this.BackColor = Color.White; this.DrawFill = true; this.DrawBorder = false; RoleName.Margin = new System.Windows.Forms.Padding(8, 8, 0, 0); RoleType.ImageLayout = System.Windows.Forms.ImageLayout.None; PersonName.Margin = new System.Windows.Forms.Padding(24, 0, 0, 0); PersonName.Layout.LeftPart.Margin = new System.Windows.Forms.Padding(0, 0, 5, 0); PersonName.StretchHorizontally = true; PersonName.ImageAlignment = ContentAlignment.MiddleLeft; PersonName.TextAlignment = ContentAlignment.MiddleLeft; Duration.Layout.LeftPart.Margin = new System.Windows.Forms.Padding(0, -3, 0, 0); Duration.ForeColor = Color.FromArgb(200, 0, 0, 0); Active.ForeColor = Color.FromArgb(200, 0, 0, 0); Active.Layout.LeftPart.Margin = new System.Windows.Forms.Padding(0, -3, 0, 0); People Person = this.Data.DataBoundItem as People; if (Person != null) { RoleName.Text = Person.Roles.Any() ? Person.Roles.FirstOrDefault().RoleTitle : "No Role"; RoleType.Text = Person.Roles.Any() ? Person.Roles.FirstOrDefault().Type.Description : ""; PersonName.Text = Person.Forename + " " + Person.Surname; int age = Person.Roles.Any() ? Function.GetAge(Person.Roles.FirstOrDefault().StartDate) : 0; Duration.Text = age + " years"; RoleName.ForeColor = Color.FromArgb(190, 0, 0, 0); RoleType.ForeColor = Color.Black; PersonName.ForeColor = Color.Black; if (RoleType.Text == "Staff" || RoleType.Text == "Volunteer") { this.BackColor = Color.FromArgb(247, 247, 247); } else { this.BackColor = Color.FromArgb(170, 13, 13); } } else { PersonName.Text = "Free Room"; Duration.Text = "0 days"; this.BackColor = Color.DarkRed; RoleName.ForeColor = Color.White; RoleType.ForeColor = Color.White; PersonName.ForeColor = Color.White; } } }}Hello,
I've posted a thread about save/restore row 2 months ago. It worked great until I grouped a column.
When a column is grouping, the row index that I save/restore is the index in the grouping zone where the row located. When I load this row index to the gridview, every grouping zone will take over this row index. For example if I save a selected row, when I reload its index, all rows which has this index in every grouping zone will be selected.
If you would like to test, check out the demo in my old post (Hristo's answer):
https://www.telerik.com/forums/restore-selected-tab-in-hierarchy-child-page-view-after-data-refresh
Thank you by advance for your help.
Regards,

Hi.
What is the best way to react to a shape being drag-dropped onto the diagram from the toolbox?
The toolbox is in an additional form.
Regards
Bernhard

Please take a look at attached image...
For the left side bar menu on that image which control of telerik should i use?
Would you please lead me to examples of that?
Thanks in advance

Hi
I've recently released a version of our software that had version 2019.1.117.40 of Telerik.Soon afterwards I needed to reformat and rebuild my working environment, reinstall visual studio and telerik and received a telerik version error after loading up my solution. So I ran an upgrade which installed 2019.1.219.40.
After this I started experiencing errors in the Virtual Grid. Last week I added a thread to the forum about access violations when calling bestfit on a column, it was suggested that my code should wait until the form is loaded/shown before doing this.In version 2019.1.117.40 I hadn't experienced this problem despite all the hours I'd spent developing and testing.
The form in question contains a panel which is parented onto a host form, so it never receives a formshown event, I use the hostform shown event to call the code on the child. But, the child panel contains a pageview with 4 pages, each of which contains a virtual grid. Even though the form is visible, I'm experiencing that same access violation on the first page of data.
Now, I'm seeing another problem which I didn't experience in 2019.1.117.40, when I attempt to change the sort order.
"Collection was modified; enumeration operation may not execute"
at System.Collections.ArrayList.ArrayListEnumeratorSimple.MoveNext()
at Telerik.WinControls.UI.VirtualGridRowElement.<GetCellElements>d__0.MoveNext()
at Telerik.WinControls.UI.VirtualGridRowElement.SynchronizeCells(Boolean updateContent)
at Telerik.WinControls.UI.VirtualGridRowElement.Synchronize(Boolean updateContent)
at Telerik.WinControls.UI.VirtualGridTableElement.SynchronizeRows(Boolean recursive, Boolean updateContent)
at Telerik.WinControls.UI.VirtualGridTableElement.OnViewInfoPropertyChanged(Object sender, PropertyChangedEventArgs e)
at Telerik.WinControls.RadObject.OnNotifyPropertyChanged(PropertyChangedEventArgs e)
at Telerik.WinControls.UI.VirtualGridViewInfo.OnNotifyPropertyChanged(PropertyChangedEventArgs e)
at Telerik.WinControls.RadObject.OnNotifyPropertyChanged(String propertyName)
at Telerik.WinControls.UI.VirtualGridViewInfo.set_IsWaiting(Boolean value)
at pulse.move.views.Helpers.MemberSelection.VirtualGridHandlerClassBase.WaitCursor(Boolean showWaiting) in W:\Projects\pulse.smartcentre.root\pulse.smartcentre\pulse.move.views\Helpers\MemberSelection\VirtualGridHandlerClass.Base.cs:line 1059
at pulse.move.views.Helpers.MemberSelection.VirtualGridHandlerClassBase.AskForData(Int32 pageIndex) in W:\Projects\pulse.smartcentre.root\pulse.smartcentre\pulse.move.views\Helpers\MemberSelection\VirtualGridHandlerClass.Base.cs:line 1009
at pulse.move.views.UserCentre.Tabs.GridHandlers.UserCentreVirtualGridHandler.AskForData(Int32 pageIndex) in W:\Projects\pulse.smartcentre.root\pulse.smartcentre\pulse.move.views\UserCentre\Tabs\GridHandlers\UserCentreVirtualGridHandler.cs:line 94
at pulse.move.views.Helpers.MemberSelection.VirtualGridHandlerClassBase.OnMasterViewSortChanged() in W:\Projects\pulse.smartcentre.root\pulse.smartcentre\pulse.move.views\Helpers\MemberSelection\VirtualGridHandlerClass.Base.cs:line 847
at pulse.move.views.Helpers.MemberSelection.VirtualGridHandlerClassBase.OnSortChanged(Object sender, VirtualGridEventArgs e) in W:\Projects\pulse.smartcentre.root\pulse.smartcentre\pulse.move.views\Helpers\MemberSelection\VirtualGridHandlerClass.Base.cs:line 865
at Telerik.WinControls.UI.RadVirtualGridElement.OnSortDescriptorsChanged(VirtualGridViewInfo viewInfo)
at Telerik.WinControls.UI.VirtualGridViewInfo.sortDescriptors_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.Collections.Generic.NotifyCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at Telerik.Collections.Generic.NotifyCollection`1.EndUpdate(Boolean notify)
at Telerik.WinControls.UI.VirtualGridInputBehavior.HandleMouseUp(MouseEventArgs args)
at Telerik.WinControls.UI.RadVirtualGrid.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at Telerik.WinControls.RadControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Although there are backup directories, how do I rollback to this earlier version of controls now I've had to reformat?

In simple mode, binding works correctly.
..............
//Define property
private float start;
public float Start
{
get => start;
set
{
if (value == Start) return;
start = value;
OnPropertyChanget("Start");
}
}
..............................................
//Binding
radTrackBar1.DataBindings.Add("Value", Data, "Start", true, DataSourceUpdateMode.OnPropertyChanged);
radTrackBar2.DataBindings.Add("Value", Data, "Start", true, DataSourceUpdateMode.OnPropertyChanged);
.........................................................
How can I use binding in range mod?
radTrackBar1.Ranges[0].Start = 1;
radTrackBar1.Ranges[0].End = 50;
radTrackBar2.Ranges[0].Start = 1;
radTrackBar2.Ranges[0].End = 50;
//Define property ??????????????????????
//Binding ??????????????????????????
Thanks!

I've looked at other posts, but I didn't see where I went wrong.
(review attached screenshot for a better understanding)
In my situation, I add background color to row cells where this is an "A" value in the cell. This stands for an aisle in a warehouse.
If you scroll slowly, then the background color stays within the rows with an "A", but if you scroll too fast, the display shows green in various cells. Also, if I clear the grid and rebuild it with new data, the background color is not reset. The previous rows that were green are still green.
What am I missing?
01.Private Sub dgvMain_CellFormatting(sender As Object, e As CellFormattingEventArgs) Handles dgvMain.CellFormatting02. If _LeftOrRightConveyor = "LEFT" And e.CellElement.ColumnIndex = AisleColumnLeft_Idx Then03. e.CellElement.BackColor = System.Drawing.Color.LightGreen04. ElseIf _LeftOrRightConveyor = "RIGHT" And e.CellElement.ColumnIndex = AisleColumnRight_Idx Then05. e.CellElement.BackColor = System.Drawing.Color.LightGreen06. End If07. 08. If e.CellElement.Value = "A" Then09. e.CellElement.BackColor = System.Drawing.Color.Lime10. End If11.End Sub