Telerik Forums
UI for WinForms Forum
8 answers
159 views
I don't like having to use a Tab Control or Panels to make a Wizard. It's a Pain 

Richard Slade
Top achievements
Rank 2
 answered on 11 Dec 2010
6 answers
257 views
Hello,

I've got this memory leak, could you guys give an explanation/workaround? I've made the simplest test case (see below), factors for the bug to occur (that I already discovered):

- it's an MDI form situation with parent & child
- the child is maximized (the menu items are added into one menubar)
- the menu item provided by the client is a menu button
- a textbox is on the child form

TestMdiParent.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
 
using Telerik.WinControls.UI;
 
namespace MenuMemoryLeak
{
    public partial class TestMdiParent : Telerik.WinControls.UI.RadForm
    {
        public TestMdiParent()
        {
            InitializeComponent();
 
        }
 
        //NOTE this stuff with the backgroundworker is just to repeatedly close/open the form, I know it's not fully correct but the bug occurs nevertheless
 
        BackgroundWorker myWorker = new BackgroundWorker() { WorkerReportsProgress = true, WorkerSupportsCancellation = false };
        TestMdiChild myMdiChild;
 
        private void TestMdiParent_Shown(object sender, EventArgs e)
        {
            myWorker.DoWork += delegate
            {
                int count = 0;
                while(true)
                {
                    ++count;
                    myWorker.ReportProgress(count);
                    System.Threading.Thread.Sleep(1000);
                }
            };
 
            myWorker.ProgressChanged += delegate
            {
                if(myMdiChild != null)
                {
                    myMdiChild.Close();
                    System.GC.Collect();
                }
                myMdiChild = new TestMdiChild() { MdiParent = this };
                myMdiChild.Show();
            };
 
            myWorker.RunWorkerAsync();
        }
    }
}

TestMdiParent
.Designer.cs
namespace MenuMemoryLeak
{
    partial class TestMdiParent
    {
        /// <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.testMenuItem = new Telerik.WinControls.UI.RadMenuItem();
            this.testParentMenu = new Telerik.WinControls.UI.RadMenu();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.testParentMenu)).BeginInit();
            this.SuspendLayout();
            //
            // testMenuItem
            //
            this.testMenuItem.Name = "testMenuItem";
            this.testMenuItem.Text = "Parent";
            //
            // TestMdiParent
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(902, 523);
            //
            // testParentMenu
            //
            this.testParentMenu.Items.AddRange(new Telerik.WinControls.RadItem[] {
            this.testMenuItem});
            this.testParentMenu.Location = new System.Drawing.Point(0, 0);
            this.testParentMenu.Name = "testParentMenu";
            this.testParentMenu.Size = new System.Drawing.Size(902, 24);
            this.testParentMenu.TabIndex = 1;
            this.testParentMenu.Text = "radMenu1";
            this.Controls.Add(this.testParentMenu);
            this.IsMdiContainer = true;
            this.Name = "TestMdiParent";
            //
            //
            //
            this.RootElement.ApplyShapeToControl = true;
            this.Text = "TestMdiParent";
            this.ThemeName = "ControlDefault";
            this.Shown += new System.EventHandler(this.TestMdiParent_Shown);
            ((System.ComponentModel.ISupportInitialize)(this.testParentMenu)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
 
        }
 
        #endregion
 
        private Telerik.WinControls.UI.RadMenuItem testMenuItem;
        private Telerik.WinControls.UI.RadMenu testParentMenu;
 
    }
}

TestMdiChild.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls;
 
namespace MenuMemoryLeak
{
    public partial class TestMdiChild : Telerik.WinControls.UI.RadForm
    {
        public TestMdiChild()
        {
            InitializeComponent();
 
            //NOTE required for bug to occur
            this.WindowState = FormWindowState.Maximized;
        }
    }
}


TestMdiChild.Designer.cs
namespace MenuMemoryLeak
{
    partial class TestMdiChild
    {
        /// <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.testMenuButtonItem = new Telerik.WinControls.UI.RadMenuButtonItem();
            this.testChildMenu = new Telerik.WinControls.UI.RadMenu();
            this.testTextBox = new Telerik.WinControls.UI.RadTextBox();
            ((System.ComponentModel.ISupportInitialize)(this.testChildMenu)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.testTextBox)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            this.SuspendLayout();
            //
            // testMenuButtonItem
            //
            this.testMenuButtonItem.Name = "testMenuButtonItem";
            this.testMenuButtonItem.Text = "Child";
            //
            // testChildMenu
            //
            this.testChildMenu.AllowMerge = false;
            this.testChildMenu.IsMainMenu = false;
            this.testChildMenu.Items.AddRange(new Telerik.WinControls.RadItem[] {
            this.testMenuButtonItem});
            this.testChildMenu.Location = new System.Drawing.Point(0, 0);
            this.testChildMenu.Name = "testChildMenu";
            this.testChildMenu.Size = new System.Drawing.Size(467, 24);
            this.testChildMenu.TabIndex = 2;
            this.testChildMenu.Text = "radMenu1";
            //
            // testTextBox
            //
            this.testTextBox.Location = new System.Drawing.Point(22, 23);
            this.testTextBox.Name = "testTextBox";
            this.testTextBox.Size = new System.Drawing.Size(100, 20);
            this.testTextBox.TabIndex = 1;
            this.testTextBox.TabStop = false;
            this.testTextBox.Text = "test";
            //
            // TestMdiChild
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(467, 268);
            this.Controls.Add(this.testChildMenu);
            this.Controls.Add(this.testTextBox);
            this.Name = "TestMdiChild";
            //
            //
            //
            this.RootElement.ApplyShapeToControl = true;
            this.Text = "TestMdiChild";
            this.ThemeName = "ControlDefault";
            ((System.ComponentModel.ISupportInitialize)(this.testChildMenu)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.testTextBox)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
 
        }
 
        #endregion
 
        private Telerik.WinControls.UI.RadMenuButtonItem testMenuButtonItem;
        private Telerik.WinControls.UI.RadMenu testChildMenu;
        private Telerik.WinControls.UI.RadTextBox testTextBox;
    }
}

If you call the parent MDI form and let it run a bit you should see the GDI objects increase by one each second and never get released.

If you know a solution/workaround, thanks a lot

Frederik
Peter
Telerik team
 answered on 11 Dec 2010
3 answers
161 views
Hi all,
i need a simple feature -  to hide/show a ColumnGroup (including all columns and ColumnGroups within).
something exactly like hide column method (via the column chooser).
thanks,
Gal.
Svett
Telerik team
 answered on 11 Dec 2010
4 answers
142 views
Hi Telerik,

I am searching for an option to localize the schedule navigator, but haven't found any solution.

What is the best practise to localize the schedule navigator?

best regards

Ulrik
Dobry Zranchev
Telerik team
 answered on 11 Dec 2010
11 answers
579 views
My grid has grouping enabled. when i expand the group, and if the grid has a horizontal scrollbar, the grid automatically scrolls to the rightmost column. 
Any clues as to why it could be doing this? Is there a property I can enable/disable to prevent this from happening. 
Or workarounds?

Thanks
Anisha
Jack
Telerik team
 answered on 11 Dec 2010
6 answers
192 views
Hello to all friends..I am making asp.net desktop application..
In that I have Telerik radgridview.

I want to export that grid in excel or in word..

Please help me as i have searched a lot but the solution i am not getting ..In telerik forums there is given export but only for silverlight grid
not for radgridview.

I am seraching for telerik radgridview export in desktop windows application..

Jack
Top achievements
Rank 1
 answered on 11 Dec 2010
4 answers
115 views

Hello,

We noticed the following problem with the RadGridView:

When you have Excel like filtering enabled, and you click on the filtering icon for a column that has duplicate decimal numbers, the app crashes with a message like this:

"Item has already been added. Key in dictionary: '26.7'  Key being added: '26.7'"

Please find attached screenshots with grid of data and error message.

Configuration used:

Rad Controls for Win Forms 2010 Q3; WinXP, .NET 2.0, VB.NET

Here is the code that populates a test grid with data:

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim rand As Random = New Random()
    Dim dt As DataTable = New DataTable()
 
    dt.Columns.Add("Pecentage", GetType(Double))
    dt.Columns.Add("Price", GetType(Double))
 
    For i As Integer = 1 To 10000
        dt.Rows.Add(rand.Next(0, 100) + rand.Next(0, 100) * 0.1, rand.Next(0, 1000000))
    Next
 
    grdData.DataSource = dt
    grdData.BestFitColumns()
End Sub

Thanks.

Richard Slade
Top achievements
Rank 2
 answered on 11 Dec 2010
1 answer
224 views
Hi Team,

I m trying to develop the real time chart (Y value as Double, X as Time), The Chart will draw like running at some interval.
Please help me in that. Kindly provide some code also.

Thanks and Regards,
Saurabh Dubey

Dean
Top achievements
Rank 2
 answered on 10 Dec 2010
9 answers
433 views
We are trying to implement a grid with HTML content being displayed in a column. Using Disablehtmlrendering=false does not work as we are having a lot of HTML markup that needs a control similar to the webbrowser control to display.

We are trying to use the CellFormatting Event to populate the cell with the web browser control but it seems like it only accepts RadElement controls. Are there any examples of embedding the Webbrowser control or Windows form controls or something similar in a Rad Gridview?
Data Systems
Top achievements
Rank 1
 answered on 10 Dec 2010
1 answer
120 views
Hi

Is there a way that I can get the following to work in a radgrid? Like a sub heading

Add: 
        Premiumn
        Investments and other income
Sub-Total

Deduct:
        Claims
        Total expenses
Sub-Total

Thanks
Julian Benkov
Telerik team
 answered on 10 Dec 2010
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
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
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
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
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
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?