Telerik Forums
UI for WinForms Forum
3 answers
627 views

I have a rad data entry in a form that when I change the data through it's bindings it doesn't clear all the fields.  Usually check boxes and dates or dropdowns leave their current selected value if the new data set has null values.

!. is there a way to fix that?

2. If not how can I loop through all the controls in the rad data entry to clear all the controls?

Below only shows 4 controls instead of the many that textboxes, etc.  *Rde is the name of the rad data entry item

foreach (Control c in Rde.Controls)
{
MessageBox.Show(c.Name);
}

 

Stephen
Top achievements
Rank 1
Iron
Iron
 answered on 22 Jul 2021
0 answers
136 views

Dear Team,

I am trying to create a content control structure with radrichtexteditor control with the below structure :

______________________________________________________

Description: (not editable)

      editable content here

Impressions: (not editable)

      editable content here

Findings:(not editable)

      editable content here

Remarks: (not editable)

      editable content here

______________________________________________________

Below are the issues I am facing

1. I try inserting a content control but not working using this documentation : Working with Content Controls | RadRichTextEditor | Telerik UI for WinForms

2. RadRichTextRibbonbar Developer Tab not visible

3.  I also tried to load xaml file from the "structure content example application" to new created richtexteditor control. also not working.

Kindly provide me with a sample project.

Thank You.

 

Ali
Top achievements
Rank 1
 asked on 21 Jul 2021
1 answer
102 views

Basically, I've created a custom list view item, there is no issues by default, but when I add an element to the item's element, when you scroll the item out of bounds it will add the element that was in the intended element into another element and remove it from the original element it was added to. How can I fix this from happening?

EDIT: This happens when item height is NOT arbitrary too.

 

EDIT 2: I have messed around, now I am no longer adding any elements (as a test), all I am doing is changing the background color of the element, when the item goes out of bounds another item in another expanded group will be the same background color and the original item will lose the background color. There is no way for me to fix this from what I can tell.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 21 Jul 2021
1 answer
159 views

Hi there,

Using control version 2021.2.615

VS2019 16.10.3

 

I have some code using a CommandBar and CommandBarStrips as below:

            // 
            // CommandBar
            // 
            this.CommandBar.Dock = System.Windows.Forms.DockStyle.Top;
            this.CommandBar.Location = new System.Drawing.Point(0, 25);
            this.CommandBar.Name = "CommandBar";
            this.CommandBar.Rows.AddRange(new Telerik.WinControls.UI.CommandBarRowElement[] {
            this.CommandBarRow});
            this.CommandBar.Size = new System.Drawing.Size(1241, 31);
            this.CommandBar.TabIndex = 4;
            this.CommandBar.ThemeName = "FluentDark";
            // 
            // CommandBarRow
            // 
            this.CommandBarRow.MinSize = new System.Drawing.Size(25, 25);
            this.CommandBarRow.Name = "CommandBarRow";
            this.CommandBarRow.Strips.AddRange(new Telerik.WinControls.UI.CommandBarStripElement[] {
            this.CommandBarToolStrip,
            this.CommandBarModelStrip});
            // 
            // CommandBarToolStrip
            // 
            this.CommandBarToolStrip.Alignment = System.Drawing.ContentAlignment.TopCenter;
            this.CommandBarToolStrip.AutoSize = true;
            this.CommandBarToolStrip.DisplayName = "commandBarStripElement1";
            this.CommandBarToolStrip.EnableDragging = false;
            this.CommandBarToolStrip.Name = "CommandBarToolStrip";
            // 
            // 
            // 
            this.CommandBarToolStrip.OverflowButton.Enabled = false;
            this.CommandBarToolStrip.OverflowButton.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
            ((Telerik.WinControls.UI.RadCommandBarOverflowButton)(CommandBarToolStrip.GetChildAt(2))).Enabled = false;
            ((Telerik.WinControls.UI.RadCommandBarOverflowButton)(CommandBarToolStrip.GetChildAt(2))).Visibility = Telerik.WinControls.ElementVisibility.Hidden;
            // 
            // CommandBarModelStrip
            // 
            this.CommandBarModelStrip.Alignment = System.Drawing.ContentAlignment.TopRight;
            this.CommandBarModelStrip.AutoSize = true;
            this.CommandBarModelStrip.DisplayName = "commandBarStripElement1";
            this.CommandBarModelStrip.Items.AddRange(new Telerik.WinControls.UI.RadCommandBarBaseItem[] {
            this.lblCurrModel,
            this.CurrentModelList});
            this.CommandBarModelStrip.Name = "CommandBarModelStrip";
            // 
            // 
            // 
            this.CommandBarModelStrip.OverflowButton.Enabled = false;
            this.CommandBarModelStrip.OverflowButton.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
            this.CommandBarModelStrip.Text = "";
            ((Telerik.WinControls.UI.RadCommandBarOverflowButton)(CommandBarModelStrip.GetChildAt(2))).Enabled = false;
            ((Telerik.WinControls.UI.RadCommandBarOverflowButton)(CommandBarModelStrip.GetChildAt(2))).Visibility = Telerik.WinControls.ElementVisibility.Hidden;
            // 
            // lblCurrModel
            // 
            this.lblCurrModel.Alignment = System.Drawing.ContentAlignment.MiddleLeft;
            this.lblCurrModel.DisplayName = "commandBarLabel1";
            this.lblCurrModel.Name = "lblCurrModel";
            this.lblCurrModel.Text = "Current Model : ";
            // 
            // CurrentModelList
            // 
            this.CurrentModelList.AutoEllipsis = true;
            this.CurrentModelList.AutoSize = false;
            this.CurrentModelList.Bounds = new System.Drawing.Rectangle(0, 0, 300, 24);
            this.CurrentModelList.DisplayName = "commandBarDropDownList1";
            this.CurrentModelList.DropDownAnimationEnabled = true;
            this.CurrentModelList.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
            this.CurrentModelList.MaxDropDownItems = 0;
            this.CurrentModelList.Name = "CurrentModelList";
            this.CurrentModelList.Text = "";
            this.CurrentModelList.SelectedIndexChanged += new Telerik.WinControls.UI.Data.PositionChangedEventHandler(this.CurrentModelList_SelectedIndexChanged);

The above code compiles and runs with no issue.

 

If I open the designer for this form, then the above code is automatically replaced by the code below:

            // 
            // CommandBar
            // 
            this.CommandBar.Dock = System.Windows.Forms.DockStyle.Top;
            this.CommandBar.Location = new System.Drawing.Point(0, 25);
            this.CommandBar.Name = "CommandBar";
            this.CommandBar.Size = new System.Drawing.Size(1241, 31);
            this.CommandBar.TabIndex = 4;
            this.CommandBar.ThemeName = "FluentDark";
            ((Telerik.WinControls.UI.CommandBarRowElement)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0))).Name = "CommandBarRow";
            ((Telerik.WinControls.UI.CommandBarRowElement)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0))).MinSize = new System.Drawing.Size(25, 25);
            ((Telerik.WinControls.UI.CommandBarStripElement)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(0))).Alignment = System.Drawing.ContentAlignment.TopCenter;
            ((Telerik.WinControls.UI.CommandBarStripElement)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(0))).Name = "CommandBarToolStrip";
            ((Telerik.WinControls.UI.RadCommandBarOverflowButton)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(2))).Enabled = false;
            ((Telerik.WinControls.UI.RadCommandBarOverflowButton)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(2))).Visibility = Telerik.WinControls.ElementVisibility.Hidden;
            ((Telerik.WinControls.UI.CommandBarStripElement)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(1))).Alignment = System.Drawing.ContentAlignment.TopRight;
            ((Telerik.WinControls.UI.CommandBarStripElement)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(1))).Name = "CommandBarModelStrip";
            ((Telerik.WinControls.UI.CommandBarLabel)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(1).GetChildAt(1).GetChildAt(0))).Text = "Current Model : ";
            ((Telerik.WinControls.UI.CommandBarLabel)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(1).GetChildAt(1).GetChildAt(0))).Alignment = System.Drawing.ContentAlignment.MiddleLeft;
            ((Telerik.WinControls.UI.CommandBarLabel)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(1).GetChildAt(1).GetChildAt(0))).Name = "lblCurrModel";
            ((Telerik.WinControls.UI.CommandBarDropDownList)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(1).GetChildAt(1).GetChildAt(1))).AutoSize = false;
            ((Telerik.WinControls.UI.CommandBarDropDownList)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(1).GetChildAt(1).GetChildAt(1))).Name = "CurrentModelList";
            ((Telerik.WinControls.UI.RadCommandBarOverflowButton)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(1).GetChildAt(2))).Enabled = false;
            ((Telerik.WinControls.UI.RadCommandBarOverflowButton)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(1).GetChildAt(2))).Visibility = Telerik.WinControls.ElementVisibility.Hidden;
            // 


This code compiles but on running the first line containing all the .GetChildAt calls throws IndexOutOfRange.

Sometimes it deletes the code completely, leaving just this:

            // 
            // CommandBar
            // 
            this.CommandBar.Dock = System.Windows.Forms.DockStyle.Top;
            this.CommandBar.Location = new System.Drawing.Point(0, 25);
            this.CommandBar.Name = "CommandBar";
            this.CommandBar.Size = new System.Drawing.Size(1241, 30);
            this.CommandBar.TabIndex = 4;
            this.CommandBar.ThemeName = "FluentDark";

Any idea what's happening here?

 

Many thanks,

 

John.

Nadya | Tech Support Engineer
Telerik team
 answered on 20 Jul 2021
0 answers
113 views

This is not a question, but a help for my future me!

When you load a layout your RadTitleElement miss events, you cannot directly set .Click event, for example, on the RadTitleElement object memory var.

You need to find out the element and set the event.

So the code below shows how to do it.


void LoadLayout(RadPanorama panorama, string userFileConfig) { panorama.LoadLayout(fileUserConfig); Fire("radTileElement1").click += (ss,ee) => DoSomething(); Fire("myCustomElementName").click += DoSomething2(); //.... } #if (DEBUG)

private string missingBlocks { get; set; } = "";

#endif

private RadTileElement Fire(string name) { for (var n = 0; n < radPanorama1.Groups.Count(); n++) { var grp = (TileGroupElement)radPanorama1.Groups[n]; foreach (RadTileElement item in grp.Items) { if (item.Name.IsEquals(name)) return item; } } #if (DEBUG) missingBlocks += ";" + name;

// This guide you if goes wrong any .Name property System.Diagnostics.Debug.WriteLine(missingBlocks); #endif

return new RadTileElement(); }

 

How use it?

 

Any were you like restore a layout:
LoadLayout(radPanorama1, mySavedLayoutFile);

 

#jefferson2020

 

 

JeffSM
Top achievements
Rank 2
Iron
Veteran
Iron
 asked on 19 Jul 2021
1 answer
119 views

Good morning
Please I would like to know if it is possible to set a shortcut

to activate the focus on a RadGridView, and then move between the lines with the keyboard arrows.

Thank you

Fabrizio

Nadya | Tech Support Engineer
Telerik team
 answered on 19 Jul 2021
1 answer
114 views

Hi.

I have a listbox on a form.  The user enters a value in a text box, clicks a button, the value is added to the list.  All that works.  The button click also sets the selected item to be the just entered value and calls scrolltoitem to reposition the listbox.  The list box doesn't reposition.

Here is the code from the button click function:


        private void radButton1_Click(object sender, EventArgs e)
        {
            var item = radTextBox1.Text;
            if (string.IsNullOrWhiteSpace(item))
                return;

            // let's make sure this folder doesn't already exist in the list.
            if (radListControl1.Items.Contains(item))
                return;

            var newItem = new RadListDataItem(item, item);

            radListControl1.Items.Add(newItem);
            radListControl1.SelectedItem = newItem;

            radListControl1.ScrollToItem(newItem);
        }

I have also attached a working example.

Why doesn't this work as expected?

Thanks

-marc

 

Nadya | Tech Support Engineer
Telerik team
 answered on 19 Jul 2021
3 answers
115 views

Hi,

We experienced some performance issue with the tabbedform components when there are some tab opened. When you try to move the application, by selecting the title bar, the move is very laggy. 

You can reproduce the issue with the demo project "First Look" of tabbedform. Just add 20 tabs and try to move the application, you will experienced some lags.

Do you have a workaround to avoid this behavior ?

Thanks a lot

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 16 Jul 2021
1 answer
101 views

Hi Team,

          In our application we are using the RadTreeView control to add the Menu items. 
While clicking or mouse over on the Menu items (Form Name) the folder icon should be highlight. Please do the needful. Video link mentioned below for your reference.

Video link : https://ttprivatenew.s3.amazonaws.com/pulse/suganya-gmail/attachments/17438074/TinyTake13-07-2021-04-01-27.mp4

Screenshot : https://prnt.sc/1aruj97

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Jul 2021
1 answer
144 views

SOLVED:  InitializeComponent() wasn't being called. Thought this was automatic?

I would have deleted this post, but there is no option.

 

I dragged the RadCheckedListBox to the form. But when I try to add data to the Item property, I get an exception because the control is null. I thought that like other controls, the RadCheckedListBox methods and properties could be accessed without having to be instantiated first. The instantiation is in Private Sub InitializeComponent() :

Me.cklstSuppressedTickets = New Telerik.WinControls.UI.RadCheckedListBox()
CType(Me.cklstSuppressedTickets,System.ComponentModel.ISupportInitialize).BeginInit
Me.grpSuppressedTickets.Controls.Add(Me.cklstSuppressedTickets)
Me.cklstSuppressedTickets.Columns.AddRange(New Telerik.WinControls.UI.ListViewDetailColumn() {ListViewDetailColumn1})
Me.cklstSuppressedTickets.Location = New System.Drawing.Point(78, 61)
Me.cklstSuppressedTickets.Name = "cklstSuppressedTickets"
Me.cklstSuppressedTickets.Size = New System.Drawing.Size(290, 357)
Me.cklstSuppressedTickets.TabIndex = 0

 

cklstSuppressedTickets is the RadCheckedListBox that I added to the form using the designer. When I highlight the control in code during debug, it shows cklstSuppressedTickets as 'Nothing'.

	Private Sub LoadList()
		Dim tkt As KeyValuePair(Of String, string)
		For each tkt In dctTickets
			cklstSuppressedTickets.Items.Add(tkt.Key & "  -  " & tkt.Value)
		Next
	End Sub

 

 

Nadya | Tech Support Engineer
Telerik team
 answered on 15 Jul 2021
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
Menu
PropertyGrid
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
Rotator
TrackBar
MessageBox
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
ColorBox
Callout
FilterView
PictureBox
VirtualKeyboard
NavigationView
Accessibility
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
Flyout
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
+? more
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?