Telerik Forums
UI for WinForms Forum
1 answer
91 views

if you completely delete the contents in the editor and press the <Enter> key, then int.MinValue is returned.

Why? In this case, you must return either null or 0 or do nothing.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 31 Oct 2018
3 answers
1.6K+ views
On Telerik control , when I click the items using mouse right click, it calls the same function of the left click & I'm unable to disable it. Please let me know if there is any property to disable the right click.
Dimitar
Telerik team
 answered on 31 Oct 2018
1 answer
113 views

Hi,

I'm able to get the samples to work but I'm having trouble adding to my project. It seems that TreeViewElement_CreateNodeElement isn't firing.

Can anyone see what I might be missing? The code below just needs a radtreeview named tvProjectPath.

Thanks in advance!!

Imports Telerik.WinControls.UI
 
Public Class RadForm1
    Private Sub RadForm1_Load(sender As Object, e As EventArgs) Handles Me.Load
        Dim rtvTest As Telerik.WinControls.UI.RadTreeView = tvProjectPath
        Dim DFSRootNode As New RadTreeNode("Root0")
        Dim ProdDataNode As New RadTreeNode("Child1")
        Dim JobsNode As New RadTreeNode("Child2")
        Dim ProjectRoot As New RadTreeNode("Child3")
        'Dim ProjectFolder As New CustomTreeNodeElement()
        tvProjectPath.Nodes.Add(DFSRootNode)
        DFSRootNode.Nodes.Add(ProdDataNode)
        ProdDataNode.Nodes.Add(JobsNode)
        JobsNode.Nodes.Add(ProjectRoot)
        'ProjectRoot.TreeViewElement =
    End Sub
    Private Sub CustomNodes_Load(sender As Object, e As EventArgs) Handles Me.Load
        Dim test As String = ""
 
        Me.tvProjectPath.ExpandAll()
    End Sub
    Private Sub TreeViewElement_CreateNodeElement(sender As Object, e As Telerik.WinControls.UI.CreateTreeNodeElementEventArgs)
        e.NodeElement = New CustomTreeNodeElement()
    End Sub
End Class
Public Class CustomContentElement
    Inherits TreeNodeContentElement
    Private nodeContentContainer As StackLayoutElement
    Private nodeLabel As RadLabelElement
    Private nodeTextBox As RadTextBoxControlElement
 
    Protected Overrides ReadOnly Property ThemeEffectiveType() As Type
        Get
            Return GetType(TreeNodeElement)
        End Get
    End Property
    Protected Overrides Sub InitializeFields()
        MyBase.InitializeFields()
        Me.StretchHorizontally = True
    End Sub
    Protected Overrides Sub CreateChildElements()
        MyBase.CreateChildElements()
        nodeContentContainer = New StackLayoutElement
        nodeContentContainer.Orientation = Orientation.Horizontal
        nodeContentContainer.StretchHorizontally = True
        nodeContentContainer.StretchVertically = False
        nodeLabel = New RadLabelElement
        Me.Children.Add(nodeLabel)
        nodeTextBox = New RadTextBoxControlElement
        Me.Children.Add(nodeTextBox)
 
    End Sub
 
End Class
Public Class CustomTreeNodeElement
    Inherits TreeNodeElement
    Protected Overrides Function CreateContentElement() As TreeNodeContentElement
        Return New CustomContentElement()
        'Dim node As RadTreeNode = Me.Data
 
    End Function
 
    Protected Overrides ReadOnly Property ThemeEffectiveType() As Type
        Get
            Return GetType(TreeNodeElement)
        End Get
    End Property
 
End Class

Dimitar
Telerik team
 answered on 31 Oct 2018
5 answers
132 views

I was prompted to download a new version, did so.

Created a new project using option one from the dropdown. Could not add any controls to the default form. I thought it was strange that it said [Download] but tried any ways.

Next I created a new project with option 2, worked fine.

So my question is, how do I use option one marked as [Download] even though I already downloaded it and saw zero errors?

Thanks for your time with this matter.

VS2017 Enterprise

Dimitar
Telerik team
 answered on 31 Oct 2018
5 answers
534 views

Hello.
In my program I need to create a UserControl that contains Telerik Controls and place them on forms (using RadForm). Everything looks fine until you change the DPI settings in the system. Image with the result of the work of the form in the attached files. At the top of the screen, it's just on the form, at the bottom I'm using UserControl. Tell me how to fix it. For RadForm and UserControl, I set AutoScaleMode.DPI and also I need to use the font Segoe UI 9.75

I use Telerik 2018.2 with .Net 3.5 Below I gave examples of my code (Forms and controls). I very much rely on your help and advice.

 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
 
namespace Standalone.DpiTest
{
    public partial class TestControl : UserControl
    {
        public TestControl()
        {
            InitializeComponent();
        }
         
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
 
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
 
        #region Component Designer generated code
 
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
            this.radLabel1 = new Telerik.WinControls.UI.RadLabel();
            this.radLabel2 = new Telerik.WinControls.UI.RadLabel();
            this.radTextBox1 = new Telerik.WinControls.UI.RadTextBox();
            this.radTextBox2 = new Telerik.WinControls.UI.RadTextBox();
            this.tableLayoutPanel1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.radLabel1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radLabel2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radTextBox1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radTextBox2)).BeginInit();
            this.SuspendLayout();
            //
            // tableLayoutPanel1
            //
            this.tableLayoutPanel1.ColumnCount = 2;
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.tableLayoutPanel1.Controls.Add(this.radTextBox2, 1, 1);
            this.tableLayoutPanel1.Controls.Add(this.radLabel1, 0, 0);
            this.tableLayoutPanel1.Controls.Add(this.radLabel2, 0, 1);
            this.tableLayoutPanel1.Controls.Add(this.radTextBox1, 1, 0);
            this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
            this.tableLayoutPanel1.RowCount = 3;
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.tableLayoutPanel1.Size = new System.Drawing.Size(562, 336);
            this.tableLayoutPanel1.TabIndex = 0;
            //
            // radLabel1
            //
            this.radLabel1.Font = new System.Drawing.Font("Segoe UI", 9.75F);
            this.radLabel1.Location = new System.Drawing.Point(4, 4);
            this.radLabel1.Margin = new System.Windows.Forms.Padding(4);
            this.radLabel1.Name = "radLabel1";
            this.radLabel1.Size = new System.Drawing.Size(65, 21);
            this.radLabel1.TabIndex = 0;
            this.radLabel1.Text = "Name: ";
            //
            // radLabel2
            //
            this.radLabel2.Font = new System.Drawing.Font("Segoe UI", 9.75F);
            this.radLabel2.Location = new System.Drawing.Point(4, 35);
            this.radLabel2.Margin = new System.Windows.Forms.Padding(4);
            this.radLabel2.Name = "radLabel2";
            this.radLabel2.Size = new System.Drawing.Size(65, 21);
            this.radLabel2.TabIndex = 1;
            this.radLabel2.Text = "Address: ";
            //
            // radTextBox1
            //
            this.radTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.radTextBox1.Font = new System.Drawing.Font("Segoe UI", 9.75F);
            this.radTextBox1.Location = new System.Drawing.Point(77, 4);
            this.radTextBox1.Margin = new System.Windows.Forms.Padding(4);
            this.radTextBox1.Name = "radTextBox1";
            this.radTextBox1.Size = new System.Drawing.Size(481, 23);
            this.radTextBox1.TabIndex = 2;
            //
            // radTextBox2
            //
            this.radTextBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.radTextBox2.Font = new System.Drawing.Font("Segoe UI", 9.75F);
            this.radTextBox2.Location = new System.Drawing.Point(77, 35);
            this.radTextBox2.Margin = new System.Windows.Forms.Padding(4);
            this.radTextBox2.Name = "radTextBox2";
            this.radTextBox2.Size = new System.Drawing.Size(481, 23);
            this.radTextBox2.TabIndex = 3;
            //
            // TestControl
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
            this.Controls.Add(this.tableLayoutPanel1);
            this.Name = "TestControl";
            this.Size = new System.Drawing.Size(562, 336);
            this.tableLayoutPanel1.ResumeLayout(false);
            this.tableLayoutPanel1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.radLabel1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radLabel2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radTextBox1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radTextBox2)).EndInit();
            this.ResumeLayout(false);
 
        }
 
        #endregion
 
        private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
        private Telerik.WinControls.UI.RadTextBox radTextBox2;
        private Telerik.WinControls.UI.RadLabel radLabel1;
        private Telerik.WinControls.UI.RadLabel radLabel2;
        private Telerik.WinControls.UI.RadTextBox radTextBox1;
    }
     
    public partial class DpiTestForm : RadForm
    {
        public DpiTestForm()
        {
            InitializeComponent();
        }
         
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
 
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
 
        #region Windows Form Designer generated code
 
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
            this.radTextBox2 = new Telerik.WinControls.UI.RadTextBox();
            this.radLabel1 = new Telerik.WinControls.UI.RadLabel();
            this.radLabel2 = new Telerik.WinControls.UI.RadLabel();
            this.radTextBox1 = new Telerik.WinControls.UI.RadTextBox();
            this.testControl1 = new Standalone.DpiTest.TestControl();
            this.tableLayoutPanel1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.radTextBox2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radLabel1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radLabel2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radTextBox1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            this.SuspendLayout();
            //
            // tableLayoutPanel1
            //
            this.tableLayoutPanel1.ColumnCount = 2;
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.tableLayoutPanel1.Controls.Add(this.radTextBox2, 1, 1);
            this.tableLayoutPanel1.Controls.Add(this.radLabel1, 0, 0);
            this.tableLayoutPanel1.Controls.Add(this.radLabel2, 0, 1);
            this.tableLayoutPanel1.Controls.Add(this.radTextBox1, 1, 0);
            this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
            this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
            this.tableLayoutPanel1.RowCount = 3;
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.tableLayoutPanel1.Size = new System.Drawing.Size(292, 114);
            this.tableLayoutPanel1.TabIndex = 1;
            //
            // radTextBox2
            //
            this.radTextBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.radTextBox2.Font = new System.Drawing.Font("Segoe UI", 9.75F);
            this.radTextBox2.Location = new System.Drawing.Point(73, 35);
            this.radTextBox2.Margin = new System.Windows.Forms.Padding(4);
            this.radTextBox2.Name = "radTextBox2";
            this.radTextBox2.Size = new System.Drawing.Size(215, 23);
            this.radTextBox2.TabIndex = 3;
            //
            // radLabel1
            //
            this.radLabel1.Font = new System.Drawing.Font("Segoe UI", 9.75F);
            this.radLabel1.Location = new System.Drawing.Point(4, 4);
            this.radLabel1.Margin = new System.Windows.Forms.Padding(4);
            this.radLabel1.Name = "radLabel1";
            this.radLabel1.Size = new System.Drawing.Size(49, 21);
            this.radLabel1.TabIndex = 0;
            this.radLabel1.Text = "Name: ";
            //
            // radLabel2
            //
            this.radLabel2.Font = new System.Drawing.Font("Segoe UI", 9.75F);
            this.radLabel2.Location = new System.Drawing.Point(4, 35);
            this.radLabel2.Margin = new System.Windows.Forms.Padding(4);
            this.radLabel2.Name = "radLabel2";
            this.radLabel2.Size = new System.Drawing.Size(61, 21);
            this.radLabel2.TabIndex = 1;
            this.radLabel2.Text = "Address: ";
            //
            // radTextBox1
            //
            this.radTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.radTextBox1.Font = new System.Drawing.Font("Segoe UI", 9.75F);
            this.radTextBox1.Location = new System.Drawing.Point(73, 4);
            this.radTextBox1.Margin = new System.Windows.Forms.Padding(4);
            this.radTextBox1.Name = "radTextBox1";
            this.radTextBox1.Size = new System.Drawing.Size(215, 23);
            this.radTextBox1.TabIndex = 2;
            //
            // testControl1
            //
            this.testControl1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.testControl1.Location = new System.Drawing.Point(0, 114);
            this.testControl1.Name = "testControl1";
            this.testControl1.Size = new System.Drawing.Size(292, 156);
            this.testControl1.TabIndex = 2;
            //
            // DpiTestForm
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
            this.ClientSize = new System.Drawing.Size(292, 270);
            this.Controls.Add(this.testControl1);
            this.Controls.Add(this.tableLayoutPanel1);
            this.Name = "DpiTestForm";
            //
            //
            //
            this.RootElement.ApplyShapeToControl = true;
            this.Text = "DpiTestForm";
            this.tableLayoutPanel1.ResumeLayout(false);
            this.tableLayoutPanel1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.radTextBox2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radLabel1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radLabel2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radTextBox1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
            this.ResumeLayout(false);
 
        }
 
        #endregion
 
        private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
        private Telerik.WinControls.UI.RadTextBox radTextBox2;
        private Telerik.WinControls.UI.RadLabel radLabel1;
        private Telerik.WinControls.UI.RadLabel radLabel2;
        private Telerik.WinControls.UI.RadTextBox radTextBox1;
        private TestControl testControl1;
    }
}
Dimitar
Telerik team
 answered on 31 Oct 2018
0 answers
68 views

Hello,

How to apply the focus on tab moving for Radcommadbardropdownlist. please do the needful

 

Marco
Top achievements
Rank 1
 asked on 31 Oct 2018
3 answers
105 views

Hello Team,

I'am using your awesome theme "Crystal" in WinForms.

I just want to know how can we re-arrange controls (Maximize, Minimize and Close) from left to right.

Thank You.


Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 Oct 2018
1 answer
86 views

Hi,

I have a richtextboxeditor that has imported and loaded an XAML document. I have another XAML document/section I would like to append/merge with the existing one. Using import method only erase prior loaded XAML and not append the new XAML content. Haven't been able to figure out a way to add XAML / append it to the already loaded XAML document. Any help would be appreciated.

J

Dimitar
Telerik team
 answered on 30 Oct 2018
1 answer
257 views

Hello

I'm a newbie to Telerik RadGrid and have been struggling to find the correct code to have a group summary row with columns. I find examples where the summary rows have text on the group header, but no examples where the summary rows can have values in the columns? Is this even possible with the RadGrid. I have used other manufacturer's controls and this is possible, but can't find any example code where this is possible with Telerik.

Could someone please provide some basic sample code to achieve the group summary rows with columns as in the screenshot. A simple test project demonstrated this would be appreciated.

Thanks

Tim


Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 Oct 2018
1 answer
109 views
 While selecting the worker view the RadScheduler sidebar is not changed. Is there are any possibilities to replace the color code like 191, 219, 255.

 Reference link: https://drive.google.com/file/d/1Uvwi8wO-ccKf_2ZMbURxEWcnK4S3IIG6/view
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 Oct 2018
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
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
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
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?