Telerik Forums
UI for WinForms Forum
4 answers
929 views
Hi,

We have a window application which developing with RadForm and all the radcontrol (Q2 2011 version).  We found that after we close each form, the memory usage in client machine does not release.  We used the JustTrace tool / Net Performance Tool and found that some of the Telerik control was disposed but not in GC.

We created a testing application to compare the memory usage for RadForm and Window Form.  In the testing application, we have one Window Forms with menu control, one RadForm with RadGridView and one Window Form with RadGridView.  When we run the application, we keep open and close the RadForm 10 times.  Then, we found the memory usage is increase around 5,000k.  However, if we do the same on Window Form, the memory usage is only increase 500k.

So, how can we release the memory after we close the forms ( before the application was not closed)?

Code for the Window Form with menu control:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
    Inherits System.Windows.Forms.Form
 
    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub
 
    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer
 
    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer. 
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.RadContextMenuManager1 = New Telerik.WinControls.UI.RadContextMenuManager()
        Me.MainMenu = New Telerik.WinControls.UI.RadMenu()
        Me.menuFavorites = New Telerik.WinControls.UI.RadMenuItem()
        Me.menuCode = New Telerik.WinControls.UI.RadMenuItem()
        Me.menuMaster = New Telerik.WinControls.UI.RadMenuItem()
        Me.menuPrice = New Telerik.WinControls.UI.RadMenuItem()
        Me.menuPO = New Telerik.WinControls.UI.RadMenuItem()
        Me.menuSO = New Telerik.WinControls.UI.RadMenuItem()
        Me.menuInventory = New Telerik.WinControls.UI.RadMenuItem()
        Me.menuInvoice = New Telerik.WinControls.UI.RadMenuItem()
        Me.menuEnquiry = New Telerik.WinControls.UI.RadMenuItem()
        Me.menuAccount = New Telerik.WinControls.UI.RadMenuItem()
        Me.menuMobile = New Telerik.WinControls.UI.RadMenuItem()
        Me.menuWindow = New Telerik.WinControls.UI.RadMenuItem()
        Me.menuHelp = New Telerik.WinControls.UI.RadMenuItem()
        Me.menuTheme = New Telerik.WinControls.UI.RadMenuItem()
        CType(Me.MainMenu, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'MainMenu
        '
        Me.MainMenu.CausesValidation = False
        Me.MainMenu.Font = New System.Drawing.Font("Verdana", 9.0!)
        Me.MainMenu.Items.AddRange(New Telerik.WinControls.RadItem() {Me.menuFavorites, Me.menuCode, Me.menuMaster, Me.menuPrice, Me.menuPO, Me.menuSO, Me.menuInventory, Me.menuInvoice, Me.menuEnquiry, Me.menuAccount, Me.menuMobile, Me.menuWindow, Me.menuHelp, Me.menuTheme})
        Me.MainMenu.Location = New System.Drawing.Point(0, 0)
        Me.MainMenu.Name = "MainMenu"
        '
        '
        '
        Me.MainMenu.RootElement.AccessibleDescription = Nothing
        Me.MainMenu.RootElement.AccessibleName = Nothing
        Me.MainMenu.RootElement.Alignment = System.Drawing.ContentAlignment.TopLeft
        Me.MainMenu.RootElement.AngleTransform = 0.0!
        Me.MainMenu.RootElement.FlipText = False
        Me.MainMenu.RootElement.Margin = New System.Windows.Forms.Padding(0)
        Me.MainMenu.RootElement.Padding = New System.Windows.Forms.Padding(0)
        Me.MainMenu.RootElement.Text = Nothing
        Me.MainMenu.RootElement.TextOrientation = System.Windows.Forms.Orientation.Horizontal
        Me.MainMenu.Size = New System.Drawing.Size(752, 38)
        Me.MainMenu.TabIndex = 7
        '
        'menuFavorites
        '
        Me.menuFavorites.AccessibleDescription = "&Favorites"
        Me.menuFavorites.AccessibleName = "&Favorites"
        Me.menuFavorites.Alignment = System.Drawing.ContentAlignment.TopLeft
        Me.menuFavorites.AngleTransform = 0.0!
        Me.menuFavorites.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren
        Me.menuFavorites.Class = ""
        Me.menuFavorites.FlipText = False
        Me.menuFavorites.Font = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuFavorites.ForeColor = System.Drawing.SystemColors.ControlText
        Me.menuFavorites.Image = Nothing
        Me.menuFavorites.ImageIndex = -1
        Me.menuFavorites.ImageKey = ""
        Me.menuFavorites.Margin = New System.Windows.Forms.Padding(0)
        Me.menuFavorites.Name = "menuFavorites"
        Me.menuFavorites.Padding = New System.Windows.Forms.Padding(0)
        Me.menuFavorites.RightToLeft = False
        Me.menuFavorites.Tag = ""
        Me.menuFavorites.Text = "&Favorites"
        Me.menuFavorites.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter
        Me.menuFavorites.TextOrientation = System.Windows.Forms.Orientation.Horizontal
        Me.menuFavorites.Visibility = Telerik.WinControls.ElementVisibility.Visible
        '
        'menuCode
        '
        Me.menuCode.AccessibleDescription = "&Code"
        Me.menuCode.AccessibleName = "&Code"
        Me.menuCode.Alignment = System.Drawing.ContentAlignment.TopLeft
        Me.menuCode.AngleTransform = 0.0!
        Me.menuCode.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren
        Me.menuCode.Class = ""
        Me.menuCode.DescriptionFont = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuCode.FlipText = False
        Me.menuCode.Font = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuCode.Image = Nothing
        Me.menuCode.ImageIndex = -1
        Me.menuCode.ImageKey = ""
        Me.menuCode.Margin = New System.Windows.Forms.Padding(0)
        Me.menuCode.Name = "menuCode"
        Me.menuCode.Padding = New System.Windows.Forms.Padding(0)
        Me.menuCode.RightToLeft = False
        Me.menuCode.ShowArrow = False
        Me.menuCode.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
        Me.menuCode.Text = "&Code"
        Me.menuCode.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter
        Me.menuCode.TextOrientation = System.Windows.Forms.Orientation.Horizontal
        Me.menuCode.Visibility = Telerik.WinControls.ElementVisibility.Visible
        '
        'menuMaster
        '
        Me.menuMaster.AccessibleDescription = "&Master"
        Me.menuMaster.AccessibleName = "&Master"
        Me.menuMaster.Alignment = System.Drawing.ContentAlignment.TopLeft
        Me.menuMaster.AngleTransform = 0.0!
        Me.menuMaster.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren
        Me.menuMaster.Class = ""
        Me.menuMaster.DescriptionFont = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuMaster.FlipText = False
        Me.menuMaster.Font = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuMaster.Image = Nothing
        Me.menuMaster.ImageIndex = -1
        Me.menuMaster.ImageKey = ""
        Me.menuMaster.Margin = New System.Windows.Forms.Padding(0)
        Me.menuMaster.Name = "menuMaster"
        Me.menuMaster.Padding = New System.Windows.Forms.Padding(0)
        Me.menuMaster.RightToLeft = False
        Me.menuMaster.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
        Me.menuMaster.Text = "&Master"
        Me.menuMaster.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter
        Me.menuMaster.TextOrientation = System.Windows.Forms.Orientation.Horizontal
        Me.menuMaster.Visibility = Telerik.WinControls.ElementVisibility.Visible
        '
        'menuPrice
        '
        Me.menuPrice.AccessibleDescription = "&Price && Promotion"
        Me.menuPrice.AccessibleName = "&Price && Promotion"
        Me.menuPrice.Alignment = System.Drawing.ContentAlignment.TopLeft
        Me.menuPrice.AngleTransform = 0.0!
        Me.menuPrice.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren
        Me.menuPrice.Class = ""
        Me.menuPrice.DescriptionFont = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuPrice.FlipText = False
        Me.menuPrice.Font = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuPrice.Image = Nothing
        Me.menuPrice.ImageIndex = -1
        Me.menuPrice.ImageKey = ""
        Me.menuPrice.Margin = New System.Windows.Forms.Padding(0)
        Me.menuPrice.Name = "menuPrice"
        Me.menuPrice.Padding = New System.Windows.Forms.Padding(0)
        Me.menuPrice.RightToLeft = False
        Me.menuPrice.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
        Me.menuPrice.Text = "&Price && Promotion"
        Me.menuPrice.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter
        Me.menuPrice.TextOrientation = System.Windows.Forms.Orientation.Horizontal
        Me.menuPrice.Visibility = Telerik.WinControls.ElementVisibility.Collapsed
        '
        'menuPO
        '
        Me.menuPO.AccessibleDescription = "&Purchase Order"
        Me.menuPO.AccessibleName = "&Purchase Order"
        Me.menuPO.Alignment = System.Drawing.ContentAlignment.TopLeft
        Me.menuPO.AngleTransform = 0.0!
        Me.menuPO.Class = ""
        Me.menuPO.DescriptionFont = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuPO.FlipText = False
        Me.menuPO.Font = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuPO.Image = Nothing
        Me.menuPO.ImageIndex = -1
        Me.menuPO.ImageKey = ""
        Me.menuPO.Margin = New System.Windows.Forms.Padding(0)
        Me.menuPO.Name = "menuPO"
        Me.menuPO.Padding = New System.Windows.Forms.Padding(0)
        Me.menuPO.RightToLeft = False
        Me.menuPO.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
        Me.menuPO.Text = "&Purchase Order"
        Me.menuPO.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter
        Me.menuPO.TextOrientation = System.Windows.Forms.Orientation.Horizontal
        Me.menuPO.Visibility = Telerik.WinControls.ElementVisibility.Collapsed
        '
        'menuSO
        '
        Me.menuSO.AccessibleDescription = "&Sales Order"
        Me.menuSO.AccessibleName = "&Sales Order"
        Me.menuSO.Alignment = System.Drawing.ContentAlignment.TopLeft
        Me.menuSO.AngleTransform = 0.0!
        Me.menuSO.Class = ""
        Me.menuSO.DescriptionFont = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuSO.FlipText = False
        Me.menuSO.Font = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuSO.Image = Nothing
        Me.menuSO.ImageIndex = -1
        Me.menuSO.ImageKey = ""
        Me.menuSO.Margin = New System.Windows.Forms.Padding(0)
        Me.menuSO.Name = "menuSO"
        Me.menuSO.Padding = New System.Windows.Forms.Padding(0)
        Me.menuSO.RightToLeft = False
        Me.menuSO.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
        Me.menuSO.Text = "&Sales Order"
        Me.menuSO.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter
        Me.menuSO.TextOrientation = System.Windows.Forms.Orientation.Horizontal
        Me.menuSO.Visibility = Telerik.WinControls.ElementVisibility.Collapsed
        '
        'menuInventory
        '
        Me.menuInventory.AccessibleDescription = "&Inventory"
        Me.menuInventory.AccessibleName = "&Inventory"
        Me.menuInventory.Alignment = System.Drawing.ContentAlignment.TopLeft
        Me.menuInventory.AngleTransform = 0.0!
        Me.menuInventory.Class = ""
        Me.menuInventory.DescriptionFont = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuInventory.FlipText = False
        Me.menuInventory.Font = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuInventory.Image = Nothing
        Me.menuInventory.ImageIndex = -1
        Me.menuInventory.ImageKey = ""
        Me.menuInventory.Margin = New System.Windows.Forms.Padding(0)
        Me.menuInventory.Name = "menuInventory"
        Me.menuInventory.Padding = New System.Windows.Forms.Padding(0)
        Me.menuInventory.RightToLeft = False
        Me.menuInventory.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
        Me.menuInventory.Text = "&Inventory"
        Me.menuInventory.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter
        Me.menuInventory.TextOrientation = System.Windows.Forms.Orientation.Horizontal
        Me.menuInventory.Visibility = Telerik.WinControls.ElementVisibility.Collapsed
        '
        'menuInvoice
        '
        Me.menuInvoice.AccessibleDescription = "&Invoice"
        Me.menuInvoice.AccessibleName = "&Invoice"
        Me.menuInvoice.Alignment = System.Drawing.ContentAlignment.TopLeft
        Me.menuInvoice.AngleTransform = 0.0!
        Me.menuInvoice.Class = ""
        Me.menuInvoice.DescriptionFont = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuInvoice.FlipText = False
        Me.menuInvoice.Font = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuInvoice.Image = Nothing
        Me.menuInvoice.ImageIndex = -1
        Me.menuInvoice.ImageKey = ""
        Me.menuInvoice.Margin = New System.Windows.Forms.Padding(0)
        Me.menuInvoice.Name = "menuInvoice"
        Me.menuInvoice.Padding = New System.Windows.Forms.Padding(0)
        Me.menuInvoice.RightToLeft = False
        Me.menuInvoice.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
        Me.menuInvoice.Text = "&Invoice"
        Me.menuInvoice.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter
        Me.menuInvoice.TextOrientation = System.Windows.Forms.Orientation.Horizontal
        Me.menuInvoice.Visibility = Telerik.WinControls.ElementVisibility.Collapsed
        '
        'menuEnquiry
        '
        Me.menuEnquiry.AccessibleDescription = "&Enquiry"
        Me.menuEnquiry.AccessibleName = "&Enquiry"
        Me.menuEnquiry.Alignment = System.Drawing.ContentAlignment.TopLeft
        Me.menuEnquiry.AngleTransform = 0.0!
        Me.menuEnquiry.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren
        Me.menuEnquiry.Class = ""
        Me.menuEnquiry.DescriptionFont = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuEnquiry.FlipText = False
        Me.menuEnquiry.Font = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuEnquiry.Image = Nothing
        Me.menuEnquiry.ImageIndex = -1
        Me.menuEnquiry.ImageKey = ""
        Me.menuEnquiry.Margin = New System.Windows.Forms.Padding(0)
        Me.menuEnquiry.Name = "menuEnquiry"
        Me.menuEnquiry.Padding = New System.Windows.Forms.Padding(0)
        Me.menuEnquiry.RightToLeft = False
        Me.menuEnquiry.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
        Me.menuEnquiry.Text = "&Enquiry"
        Me.menuEnquiry.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter
        Me.menuEnquiry.TextOrientation = System.Windows.Forms.Orientation.Horizontal
        Me.menuEnquiry.Visibility = Telerik.WinControls.ElementVisibility.Collapsed
        '
        'menuAccount
        '
        Me.menuAccount.AccessibleDescription = "Account"
        Me.menuAccount.AccessibleName = "Account"
        Me.menuAccount.Alignment = System.Drawing.ContentAlignment.TopLeft
        Me.menuAccount.AngleTransform = 0.0!
        Me.menuAccount.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren
        Me.menuAccount.Class = ""
        Me.menuAccount.DescriptionFont = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuAccount.FlipText = False
        Me.menuAccount.Font = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuAccount.Image = Nothing
        Me.menuAccount.ImageIndex = -1
        Me.menuAccount.ImageKey = ""
        Me.menuAccount.Margin = New System.Windows.Forms.Padding(0)
        Me.menuAccount.MaxSize = New System.Drawing.Size(0, 0)
        Me.menuAccount.Name = "menuAccount"
        Me.menuAccount.Padding = New System.Windows.Forms.Padding(0)
        Me.menuAccount.RightToLeft = False
        Me.menuAccount.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
        Me.menuAccount.Text = "Account"
        Me.menuAccount.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter
        Me.menuAccount.TextOrientation = System.Windows.Forms.Orientation.Horizontal
        Me.menuAccount.Visibility = Telerik.WinControls.ElementVisibility.Collapsed
        '
        'menuMobile
        '
        Me.menuMobile.Alignment = System.Drawing.ContentAlignment.TopLeft
        Me.menuMobile.AngleTransform = 0.0!
        Me.menuMobile.Class = ""
        Me.menuMobile.FlipText = False
        Me.menuMobile.Font = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuMobile.Image = Nothing
        Me.menuMobile.ImageIndex = -1
        Me.menuMobile.ImageKey = ""
        Me.menuMobile.Margin = New System.Windows.Forms.Padding(0)
        Me.menuMobile.Name = "menuMobile"
        Me.menuMobile.Padding = New System.Windows.Forms.Padding(0)
        Me.menuMobile.RightToLeft = False
        Me.menuMobile.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
        Me.menuMobile.Text = ""
        Me.menuMobile.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter
        Me.menuMobile.TextOrientation = System.Windows.Forms.Orientation.Horizontal
        Me.menuMobile.Visibility = Telerik.WinControls.ElementVisibility.Collapsed
        '
        'menuWindow
        '
        Me.menuWindow.AccessibleDescription = "Windows"
        Me.menuWindow.AccessibleName = "Windows"
        Me.menuWindow.Alignment = System.Drawing.ContentAlignment.TopLeft
        Me.menuWindow.AngleTransform = 0.0!
        Me.menuWindow.Class = ""
        Me.menuWindow.FitToSizeMode = Telerik.WinControls.RadFitToSizeMode.FitToParentContent
        Me.menuWindow.FlipText = False
        Me.menuWindow.Font = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuWindow.Image = Nothing
        Me.menuWindow.ImageIndex = -1
        Me.menuWindow.ImageKey = ""
        Me.menuWindow.Margin = New System.Windows.Forms.Padding(0)
        Me.menuWindow.MdiList = True
        Me.menuWindow.Name = "menuWindow"
        Me.menuWindow.Padding = New System.Windows.Forms.Padding(0)
        Me.menuWindow.RightToLeft = False
        Me.menuWindow.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
        Me.menuWindow.Tag = "視窗"
        Me.menuWindow.Text = "Windows"
        Me.menuWindow.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter
        Me.menuWindow.TextOrientation = System.Windows.Forms.Orientation.Horizontal
        Me.menuWindow.Visibility = Telerik.WinControls.ElementVisibility.Visible
        '
        'menuHelp
        '
        Me.menuHelp.AccessibleDescription = "&Help"
        Me.menuHelp.AccessibleName = "&Help"
        Me.menuHelp.Alignment = System.Drawing.ContentAlignment.TopLeft
        Me.menuHelp.AngleTransform = 0.0!
        Me.menuHelp.Class = ""
        Me.menuHelp.FlipText = False
        Me.menuHelp.Font = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuHelp.Image = Nothing
        Me.menuHelp.ImageIndex = -1
        Me.menuHelp.ImageKey = ""
        Me.menuHelp.Margin = New System.Windows.Forms.Padding(0)
        Me.menuHelp.Name = "menuHelp"
        Me.menuHelp.Padding = New System.Windows.Forms.Padding(0)
        Me.menuHelp.RightToLeft = False
        Me.menuHelp.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
        Me.menuHelp.Text = "&Help"
        Me.menuHelp.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter
        Me.menuHelp.TextOrientation = System.Windows.Forms.Orientation.Horizontal
        Me.menuHelp.Visibility = Telerik.WinControls.ElementVisibility.Hidden
        '
        'menuTheme
        '
        Me.menuTheme.AccessibleDescription = "Theme"
        Me.menuTheme.AccessibleName = "Theme"
        Me.menuTheme.Alignment = System.Drawing.ContentAlignment.TopLeft
        Me.menuTheme.AngleTransform = 0.0!
        Me.menuTheme.Class = ""
        Me.menuTheme.Enabled = False
        Me.menuTheme.FlipText = False
        Me.menuTheme.Font = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.menuTheme.Image = Nothing
        Me.menuTheme.ImageIndex = -1
        Me.menuTheme.ImageKey = ""
        Me.menuTheme.Margin = New System.Windows.Forms.Padding(0)
        Me.menuTheme.Name = "menuTheme"
        Me.menuTheme.Padding = New System.Windows.Forms.Padding(0)
        Me.menuTheme.RightToLeft = False
        Me.menuTheme.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
        Me.menuTheme.Text = "Theme"
        Me.menuTheme.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter
        Me.menuTheme.TextOrientation = System.Windows.Forms.Orientation.Horizontal
        Me.menuTheme.Visibility = Telerik.WinControls.ElementVisibility.Hidden
        '
        'Form1
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(752, 338)
        Me.Controls.Add(Me.MainMenu)
        Me.IsMdiContainer = True
        Me.Name = "Form1"
        Me.Text = "Form1"
        CType(Me.MainMenu, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)
        Me.PerformLayout()
 
    End Sub
    Friend WithEvents RadContextMenuManager1 As Telerik.WinControls.UI.RadContextMenuManager
    Friend WithEvents MainMenu As Telerik.WinControls.UI.RadMenu
    Friend WithEvents menuFavorites As Telerik.WinControls.UI.RadMenuItem
    Friend WithEvents menuCode As Telerik.WinControls.UI.RadMenuItem
    Friend WithEvents menuMaster As Telerik.WinControls.UI.RadMenuItem
    Friend WithEvents menuPrice As Telerik.WinControls.UI.RadMenuItem
    Friend WithEvents menuPO As Telerik.WinControls.UI.RadMenuItem
    Friend WithEvents menuSO As Telerik.WinControls.UI.RadMenuItem
    Friend WithEvents menuInventory As Telerik.WinControls.UI.RadMenuItem
    Friend WithEvents menuInvoice As Telerik.WinControls.UI.RadMenuItem
    Friend WithEvents menuEnquiry As Telerik.WinControls.UI.RadMenuItem
    Friend WithEvents menuAccount As Telerik.WinControls.UI.RadMenuItem
    Friend WithEvents menuMobile As Telerik.WinControls.UI.RadMenuItem
    Friend WithEvents menuWindow As Telerik.WinControls.UI.RadMenuItem
    Friend WithEvents menuHelp As Telerik.WinControls.UI.RadMenuItem
    Friend WithEvents menuTheme As Telerik.WinControls.UI.RadMenuItem
 
End Class


vb code:
Public Class Form1
    Private WithEvents frmRad As RadForm1
    Private WithEvents frmForm As Form2
 
    Private Sub menuCode_Click(sender As System.Object, e As System.EventArgs) Handles menuCode.Click
        frmRad = New RadForm1
        frmRad.Show()
    End Sub
 
    Private Sub menuMaster_Click(sender As System.Object, e As System.EventArgs) Handles menuMaster.Click
        frmForm = New Form2
        frmForm.Show()
    End Sub
 
    Private Sub frmForm_FormClosed(sender As Object, e As System.Windows.Forms.FormClosedEventArgs) Handles frmForm.FormClosed
        frmForm = Nothing
    End Sub
 
    Private Sub frmRad_FormClosed(sender As Object, e As System.Windows.Forms.FormClosedEventArgs) Handles frmRad.FormClosed
        frmRad = Nothing
    End Sub
End Class


RadForm:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class RadForm1
    Inherits Telerik.WinControls.UI.RadForm
 
    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub
 
    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer
 
    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer. 
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.RadGridView1 = New Telerik.WinControls.UI.RadGridView()
        CType(Me.RadGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'RadGridView1
        '
        Me.RadGridView1.Location = New System.Drawing.Point(32, 23)
        Me.RadGridView1.Name = "RadGridView1"
        Me.RadGridView1.Size = New System.Drawing.Size(240, 150)
        Me.RadGridView1.TabIndex = 1
        Me.RadGridView1.Text = "RadGridView1"
        '
        'RadForm1
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(308, 292)
        Me.Controls.Add(Me.RadGridView1)
        Me.Name = "RadForm1"
        '
        '
        '
        Me.RootElement.ApplyShapeToControl = True
        Me.Text = "RadForm1"
        CType(Me.RadGridView1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)
 
    End Sub
    Friend WithEvents RadGridView1 As Telerik.WinControls.UI.RadGridView
End Class

Window Form with RadGridView:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form2
    Inherits System.Windows.Forms.Form
 
    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub
 
    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer
 
    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer. 
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.RadGridView1 = New Telerik.WinControls.UI.RadGridView()
        CType(Me.RadGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'RadGridView1
        '
        Me.RadGridView1.Location = New System.Drawing.Point(12, 12)
        Me.RadGridView1.Name = "RadGridView1"
        Me.RadGridView1.Size = New System.Drawing.Size(240, 150)
        Me.RadGridView1.TabIndex = 0
        Me.RadGridView1.Text = "RadGridView1"
        '
        'Form2
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(284, 262)
        Me.Controls.Add(Me.RadGridView1)
        Me.Name = "Form2"
        Me.Text = "Form2"
        CType(Me.RadGridView1, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)
 
    End Sub
    Friend WithEvents RadGridView1 As Telerik.WinControls.UI.RadGridView
End Class

Best Regards,
Emily
Peter
Telerik team
 answered on 18 Jan 2012
2 answers
162 views
Good morning.
    I don't want to display the frame around the RadListControl I dragged into a page (see attached image). Is it possible? I posted here because I don't know if it's a property of the RadPageView (I use ViewMode = ExplorerBar) or of the RadListControl.

Thank you very much
Gianfranco
Franco
Top achievements
Rank 1
 answered on 18 Jan 2012
1 answer
216 views
I set the ShowCheckBoxes property of a ListView to true. Now how can I change checkbox state to THREE state instead of two states. I know with a CheckBox you can set IsThreeState = true. I am not able to find this property of the ListView. 

thanks,
Kris...
Ivan Todorov
Telerik team
 answered on 17 Jan 2012
1 answer
126 views
I am trying to change orientation of the columns headings which are grouped together. But, its not working. As soon as I remove the grouping it works. Is there a fix for it yet and/or suggestions how to solve this.

Thanks,

Inder
Ivan Petrov
Telerik team
 answered on 17 Jan 2012
2 answers
146 views
I have the following aspx code in a usercontrol:

<telerik:RadTabStrip ID="radTSCapabilities" runat="server" SelectedIndex="0" Skin="Default" MultiPageID="radMPCapabilities" />
    <telerik:RadMultiPage ID="radMPCapabilities" runat="server" SelectedIndex="0" />

I dynamically create the Tabs and PageViews from the code behind on load.  Inside the PageView is a RadTreeView.  See code below:
Telerik.Web.UI.RadPageView tmpPageView = new Telerik.Web.UI.RadPageView();
tmpPageView.ID = type.AbilityType.Name;
radMPCapabilities.PageViews.Add(tmpPageView);
 
//Add a Tab for the AbilityType
Telerik.Web.UI.RadTab tmpTab = new Telerik.Web.UI.RadTab(type.AbilityType.Name, type.AbilityType.ID.ToString());
tmpTab.PageViewID = tmpPageView.ID;
radTSCapabilities.Tabs.Add(tmpTab);
 
//Create and Load the Rad Tree
Telerik.Web.UI.RadTreeView radTree = new Telerik.Web.UI.RadTreeView();
radTree.Skin = "Default";
radTree.CheckBoxes = true;
radTree.TriStateCheckBoxes = true;
radTree.CheckChildNodes = true;
radTree.NodeDataBound += new Telerik.Web.UI.RadTreeViewEventHandler(radTree_NodeDataBound);
radTree.ID = type.AbilityType.ID.ToString() + type.AbilityType.Name.Replace(" ", "_");
radTree.DataTextField = "Name";
radTree.DataValueField = "ID";
radTree.DataFieldID = "ID";
radTree.DataFieldParentID = "ParentID";
 
//If there are multiple Ability Types in result set then go to the DB to get all Abilities for that type
if (distinctAbilityTypes.Count() != 1)
    radTree.DataSource = AbilityMgr.GetAbilitiesByAbilityTypeID(type.AbilityType.ID);
else
    radTree.DataSource = tmpAbilities;
 
//Bind the Tree
radTree.DataBind();
 
//Add a top border
Literal tmpLiteral = new Literal();
tmpLiteral.Text = "<div style='border-top:solid 1px #AAAAAA;'></div>";
 
//Add the Literal and Tree to the associated PageView
radMPCapabilities.FindControl(type.AbilityType.Name).Controls.Add(tmpLiteral);
radMPCapabilities.FindControl(type.AbilityType.Name).Controls.Add(radTree);

I am trying to get a reference to the dynamically created RadTreeView.  I have been unable to do so for some time now.  Please help.

Thank you.
Stefan
Telerik team
 answered on 17 Jan 2012
1 answer
256 views
I added a context menu to a RadGridView and when I handle the Click I show a dialog.  The dialog pops up but somehow it does not have focus...even though I called ShowDialog.  I actually have to click on the dialog for it to have focus.  Also, the menu stays visible and it has focus.  If I hit the ESC key the context menu goes away and then the dialog gains focus.

1) how should I be handling the menu item being selected so that this won't happen?
2) where is there real documentation on context menus?
Jack
Telerik team
 answered on 17 Jan 2012
4 answers
129 views
Ivan Todorov
Telerik team
 answered on 17 Jan 2012
3 answers
128 views
Just switched from a Winforms DataGridView to a RadGridView on a client project and the customer has asked if they can have the Selection Rectangle (as shown here http://www.telerik.com/help/winforms/gridview-rows-selection-rectangle.html 
) enabled on the row selectors as well.

Dragging anywhere in the cells starts the selection but attempting to drag over a row header does not continue it. They would like to be able to start selecting multiple rows by dragging from the row selectors (to the left of each row).

The issue is that they are used to the way the old DataGridView works and would like it to work the same way. A minor issue yes, but users don't like change.

Is there a hack so that I can enable the rectangle selection to show and start when a mouse click occurs on the row selector too?

Thanks in advance

Terry
Jack
Telerik team
 answered on 17 Jan 2012
2 answers
129 views
Hello all,

Scenario:
I am using the latest Radcontrols for Winforms (2011.3.11.1116) and I have a list of classes(categories) comprised of the following:
Name (string)
SubCats (List of objects(1) - each with props (Name, list of Reports))
Reports (List of objects(1) - each with props (list of Reports)) 

Reports is made up of Name and ID

Is it possible to use something like:
.Displaymember = "Name\Name\Name\Name"
.ChildMemeber = "categories\Reports\SubCats\Reports

or am I forced to loop through my class and populate the nodes manually?

Any help is appreciated.
Julian Benkov
Telerik team
 answered on 17 Jan 2012
1 answer
168 views
Hi
I want to update Rad Control for WinForms Q3 2010 to latest version. How can I do it.
I try to use tool update of Telerik: Project Update Utility. But it occurs so many errors.
Thank you.
Stefan
Telerik team
 answered on 17 Jan 2012
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)
Form
Chart (obsolete as of Q1 2013)
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
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
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
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?