Unplanned
Last Updated: 30 Mar 2016 14:01 by ADMIN
ADMIN
Stefan
Created on: 05 May 2015 06:58
Category: UI for WinForms
Type: Bug Report
1
FIX. RadGridView - opening and closing the Property Builder will delete all child controls of the grid, added at design time.
Steps to reproduce:
1. Drag a grid on the form
2. Drag one or more controls over the grid - at this point in the Document Outline you can see the dragged control is a child of the grid
3. Open the Property Builder of the grid and close it - at this point the dragged control disappears

Workaround:
1. Open the Designer.cs file, and locate the line, where the control is added to the grid e.g.
            this.radGridView2.Controls.Add(this.radButton4);
and change it to:
            this.Controls.Add(this.radButton4);

If need be, set the Location property of the control at design time, to position it at the desired place.

2. Alternatively, you can place the control outside the grid bounds and after selecting it, use the arrow keys to position is over the grid. This will not make it its child, hence the issue will not appear.
2 comments
ADMIN
Stefan
Posted on: 14 May 2015 11:09
Hi Joe,

If you don't have these lines, add them. The issue here is that the control is not added to the form, hence it is not visible. Find the area where other controls are added to the form and add these as well.

In regards to the second workaround, I have tested it and it works fine on my end. Place the button on the form - not over any other control. Then select it and with the keyboard arrow keys move it to the desired location.
Imported User
Posted on: 05 May 2015 12:26
I am not able to get either work around to work.  
For 1, there are no "add(this.radButton) lines in my designer.cs, it has lines like:
this.radDropDownButton1 = new Telerik.WinControls.UI.RadDropDownButton();
and
((System.ComponentModel.ISupportInitialize)(this.radDropDownButton1)).BeginInit();
and then the section that defins the button properties:
// radDropDownButton1
            // 
            this.radDropDownButton1.AutoSize = true;
            this.radDropDownButton1.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
            this.radDropDownButton1.DisplayStyle = Telerik.WinControls.DisplayStyle.Text;
            this.radDropDownButton1.Dock = System.Windows.Forms.DockStyle.Top;
            this.radDropDownButton1.Items.AddRange(new Telerik.WinControls.RadItem[] {
            this.radMenuItem1,
            this.radMenuSeparatorItem1,
            this.radMenuItem2});
            this.radDropDownButton1.Location = new System.Drawing.Point(200, 200);
            this.radDropDownButton1.Name = "radDropDownButton1";
            this.radDropDownButton1.Size = new System.Drawing.Size(16, 14);
            this.radDropDownButton1.TabIndex = 11;

And if I do workaround number two it does the same thing as before.

Joe