or
| using System; |
| using System.Collections.Generic; |
| using System.Linq; |
| using System.Windows.Forms; |
| using Telerik.WinControls.UI; |
| using Telerik.WinControls.UI.Docking; |
| namespace radDockTest |
| { |
| static class Program |
| { |
| /// <summary> |
| /// Point d'entrée principal de l'application. |
| /// </summary> |
| [STAThread] |
| static void Main() |
| { |
| Application.EnableVisualStyles(); |
| Application.SetCompatibleTextRenderingDefault(false); |
| Application.Run(new MainForm()); |
| } |
| } |
| public class ChildForm : RadForm { |
| public void setContent(Control control) { |
| control.Dock = DockStyle.Fill; |
| Controls.Add(control); |
| } |
| } |
| public partial class MainForm : RadForm { |
| public MainForm() { |
| InitializeComponent(); |
| IsMdiContainer = true; |
| radDock.AutoDetectMdiChildren = true; |
| } |
| private void radButton1_Click(object sender, EventArgs e) { |
| addChildForm("One", true); |
| } |
| private void radButton2_Click(object sender, EventArgs e) { |
| addChildForm("Two", false); |
| } |
| void addChildForm(string title, bool one) { |
| ChildForm child = new ChildForm(); |
| child.setContent(one ? (Control)new UserControl1() : (Control)new UserControl2()); |
| DockWindow dockWindow = radDock.DockControl(child, DockPosition.Fill, DockType.Document); |
| dockWindow.TabStripItem.Text = title; |
| } |
| } |
| partial class MainForm { |
| /// <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); |
| } |
| private void InitializeComponent() { |
| this.radDock = new Telerik.WinControls.UI.Docking.RadDock(); |
| this.documentContainer1 = new Telerik.WinControls.UI.Docking.DocumentContainer(); |
| this.radPanel = new Telerik.WinControls.UI.RadPanel(); |
| this.radButton1 = new Telerik.WinControls.UI.RadButton(); |
| this.radButton2 = new Telerik.WinControls.UI.RadButton(); |
| ((System.ComponentModel.ISupportInitialize)(this.radDock)).BeginInit(); |
| this.radDock.SuspendLayout(); |
| ((System.ComponentModel.ISupportInitialize)(this.documentContainer1)).BeginInit(); |
| ((System.ComponentModel.ISupportInitialize)(this.radPanel)).BeginInit(); |
| this.radPanel.SuspendLayout(); |
| ((System.ComponentModel.ISupportInitialize)(this.radButton1)).BeginInit(); |
| ((System.ComponentModel.ISupportInitialize)(this.radButton2)).BeginInit(); |
| ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); |
| this.SuspendLayout(); |
| // |
| // radDock |
| // |
| this.radDock.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(254))))); |
| this.radDock.Controls.Add(this.documentContainer1); |
| this.radDock.Dock = System.Windows.Forms.DockStyle.Fill; |
| this.radDock.DocumentManager.DocumentInsertOrder = Telerik.WinControls.UI.Docking.DockWindowInsertOrder.InFront; |
| this.radDock.Location = new System.Drawing.Point(0, 0); |
| thisthis.radDock.MainDocumentContainer = this.documentContainer1; |
| this.radDock.Name = "radDock"; |
| this.radDock.Size = new System.Drawing.Size(284, 231); |
| this.radDock.TabIndex = 0; |
| this.radDock.TabStop = false; |
| this.radDock.Text = "radDock"; |
| // |
| // documentContainer1 |
| // |
| this.documentContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(254))))); |
| this.documentContainer1.Location = new System.Drawing.Point(0, 0); |
| this.documentContainer1.Name = "documentContainer1"; |
| this.documentContainer1.Size = new System.Drawing.Size(284, 231); |
| this.documentContainer1.SizeInfo.SizeMode = Telerik.WinControls.UI.Docking.SplitPanelSizeMode.Fill; |
| this.documentContainer1.TabIndex = 0; |
| this.documentContainer1.TabStop = false; |
| // |
| // radPanel |
| // |
| this.radPanel.Controls.Add(this.radButton2); |
| this.radPanel.Controls.Add(this.radButton1); |
| this.radPanel.Dock = System.Windows.Forms.DockStyle.Bottom; |
| this.radPanel.Location = new System.Drawing.Point(0, 201); |
| this.radPanel.Name = "radPanel"; |
| this.radPanel.Size = new System.Drawing.Size(284, 30); |
| this.radPanel.TabIndex = 1; |
| // |
| // radButton1 |
| // |
| this.radButton1.AllowShowFocusCues = true; |
| this.radButton1.Location = new System.Drawing.Point(3, 3); |
| this.radButton1.Name = "radButton1"; |
| this.radButton1.Size = new System.Drawing.Size(75, 23); |
| this.radButton1.TabIndex = 0; |
| this.radButton1.Text = "Form1"; |
| this.radButton1.Click += new System.EventHandler(this.radButton1_Click); |
| // |
| // radButton2 |
| // |
| this.radButton2.AllowShowFocusCues = true; |
| this.radButton2.Location = new System.Drawing.Point(86, 4); |
| this.radButton2.Name = "radButton2"; |
| this.radButton2.Size = new System.Drawing.Size(75, 23); |
| this.radButton2.TabIndex = 1; |
| this.radButton2.Text = "Form2"; |
| this.radButton2.Click += new System.EventHandler(this.radButton2_Click); |
| // |
| // MainForm |
| // |
| this.ClientSize = new System.Drawing.Size(284, 231); |
| this.Controls.Add(this.radDock); |
| this.Controls.Add(this.radPanel); |
| this.Name = "MainForm"; |
| // |
| // |
| // |
| this.RootElement.ApplyShapeToControl = true; |
| ((System.ComponentModel.ISupportInitialize)(this.radDock)).EndInit(); |
| this.radDock.ResumeLayout(false); |
| ((System.ComponentModel.ISupportInitialize)(this.documentContainer1)).EndInit(); |
| ((System.ComponentModel.ISupportInitialize)(this.radPanel)).EndInit(); |
| this.radPanel.ResumeLayout(false); |
| ((System.ComponentModel.ISupportInitialize)(this.radButton1)).EndInit(); |
| ((System.ComponentModel.ISupportInitialize)(this.radButton2)).EndInit(); |
| ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); |
| this.ResumeLayout(false); |
| } |
| private Telerik.WinControls.UI.Docking.RadDock radDock; |
| private Telerik.WinControls.UI.Docking.DocumentContainer documentContainer1; |
| private Telerik.WinControls.UI.RadPanel radPanel; |
| private Telerik.WinControls.UI.RadButton radButton2; |
| private Telerik.WinControls.UI.RadButton radButton1; |
| } |
| public partial class UserControl1 : UserControl { |
| public UserControl1() { |
| InitializeComponent(); |
| } |
| } |
| partial class UserControl1 { |
| /// <summary> |
| /// Variable nécessaire au concepteur. |
| /// </summary> |
| private System.ComponentModel.IContainer components = null; |
| /// <summary> |
| /// Nettoyage des ressources utilisées. |
| /// </summary> |
| /// <param name="disposing">true si les ressources managĂ©es doivent Ăªtre supprimĂ©es ; sinon, false.</param> |
| protected override void Dispose(bool disposing) { |
| if (disposing && (components != null)) { |
| components.Dispose(); |
| } |
| base.Dispose(disposing); |
| } |
| #region Code généré par le Concepteur de composants |
| /// <summary> |
| /// Méthode requise pour la prise en charge du concepteur - ne modifiez pas |
| /// le contenu de cette méthode avec l'éditeur de code. |
| /// </summary> |
| private void InitializeComponent() { |
| this.radLabel = new Telerik.WinControls.UI.RadLabel(); |
| ((System.ComponentModel.ISupportInitialize)(this.radLabel)).BeginInit(); |
| this.SuspendLayout(); |
| // |
| // radLabel |
| // |
| this.radLabel.AutoSize = false; |
| this.radLabel.Dock = System.Windows.Forms.DockStyle.Fill; |
| this.radLabel.Location = new System.Drawing.Point(0, 0); |
| this.radLabel.Name = "radLabel"; |
| // |
| // |
| // |
| this.radLabel.RootElement.StretchHorizontally = true; |
| this.radLabel.RootElement.StretchVertically = true; |
| this.radLabel.Size = new System.Drawing.Size(150, 150); |
| this.radLabel.TabIndex = 0; |
| this.radLabel.Text = "Dock me elsewhere and the title will change. Please tell me how to keep the initi" + |
| "al one."; |
| // |
| // UserControl1 |
| // |
| this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); |
| this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
| this.Controls.Add(this.radLabel); |
| this.Name = "UserControl1"; |
| ((System.ComponentModel.ISupportInitialize)(this.radLabel)).EndInit(); |
| this.ResumeLayout(false); |
| } |
| #endregion |
| private Telerik.WinControls.UI.RadLabel radLabel; |
| } |
| public partial class UserControl2 : UserControl { |
| public UserControl2() { |
| InitializeComponent(); |
| } |
| } |
| partial class UserControl2 { |
| /// <summary> |
| /// Variable nécessaire au concepteur. |
| /// </summary> |
| private System.ComponentModel.IContainer components = null; |
| /// <summary> |
| /// Nettoyage des ressources utilisées. |
| /// </summary> |
| /// <param name="disposing">true si les ressources managĂ©es doivent Ăªtre supprimĂ©es ; sinon, false.</param> |
| protected override void Dispose(bool disposing) { |
| if (disposing && (components != null)) { |
| components.Dispose(); |
| } |
| base.Dispose(disposing); |
| } |
| #region Code généré par le Concepteur de composants |
| /// <summary> |
| /// Méthode requise pour la prise en charge du concepteur - ne modifiez pas |
| /// le contenu de cette méthode avec l'éditeur de code. |
| /// </summary> |
| private void InitializeComponent() { |
| this.radLabel = new Telerik.WinControls.UI.RadLabel(); |
| ((System.ComponentModel.ISupportInitialize)(this.radLabel)).BeginInit(); |
| this.SuspendLayout(); |
| // |
| // radLabel |
| // |
| this.radLabel.AutoSize = false; |
| this.radLabel.Dock = System.Windows.Forms.DockStyle.Fill; |
| this.radLabel.Location = new System.Drawing.Point(0, 0); |
| this.radLabel.Name = "radLabel"; |
| // |
| // |
| // |
| this.radLabel.RootElement.StretchHorizontally = true; |
| this.radLabel.RootElement.StretchVertically = true; |
| this.radLabel.Size = new System.Drawing.Size(218, 189); |
| this.radLabel.TabIndex = 1; |
| this.radLabel.Text = "Dock me elsewhere and the title will change. Please tell me how to keep the initi" + |
| "al one."; |
| // |
| // UserControl2 |
| // |
| this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); |
| this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
| this.Controls.Add(this.radLabel); |
| this.Name = "UserControl2"; |
| this.Size = new System.Drawing.Size(218, 189); |
| ((System.ComponentModel.ISupportInitialize)(this.radLabel)).EndInit(); |
| this.ResumeLayout(false); |
| } |
| #endregion |
| private Telerik.WinControls.UI.RadLabel radLabel; |
| } |
| } |
Hi,
I added a read only BindingList as a DataSource to a grid view. AllowAdd, AllowEdit, AllowRemove are all set to false and IsReadOnly is set to true. But the grid view still allows the edit of cells and adding new rows. Is this by design or do I miss any configuration!? I know that the normal Windows Forms DataGridView evaluates these flags I and thought the Telerik grid view would do the same.
Regards
Martin

| HslColor baseColor = HslColor.FromArgb(255, 56, 154, 254); |
| currentTheme.AddColorBlend("BaseColor", baseColor); |
| currentTheme.ThemeProperties["BaseColor"] = HslColor.FromArgb(255, 204, 102, 0); |

We use Telerik and a radLabel. Can anybody tell me how I change the borderstyle to fixed 3d. The current telerik radlabel can only set the border to single, fourinner and a third one. It does not give me the opportunity of using Fixed3d
How can this be achived.