Telerik Forums
UI for WinForms Forum
4 answers
173 views
Hey Telerik,

I've discovered a memory leak issue when repeatedly auto-hiding then docking a ToolWindow in a RadDock.

I'm designing an application using the MVVM design pattern with a basic View and View-Model. The View is a form that contains a RadDock with a ToolWindow, and data-binding setup to the ToolWindow's property "DockState." The View-Model contains the bound property "ToolWindow1DockState" that uses INotifyPropertyChanged to update the ToolWindow's property "DockState". Below is my code, attached is my View's designer.

View
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using RadDockMemoryTest.ViewModel;
 
namespace RadDockMemoryTest.View
{
    public partial class Form1 : Form
    {
        private MainViewModel viewModel;
        /// <summary>
        /// View Model object
        /// </summary>
        public MainViewModel ViewModel
        {
            get
            {
                if (viewModel == null)
                {
                    ViewModel = new MainViewModel();
                }
                return viewModel;
            }
            set { viewModel = value; }
        }
         
        /// <summary>
        /// Form default constructor
        /// </summary>
        public Form1()
        {
            InitializeComponent();
        }
 
        /// <summary>
        /// Form load event handler
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Form1_Load(object sender, EventArgs e)
        {
            setupControlBindings();
        }
 
        /// <summary>
        /// Setup window's control bindings
        /// </summary>
        private void setupControlBindings()
        {
            radDock1.DockWindows["toolWindow1"].DataBindings.Add("DockState", ViewModel, "ToolWindow1DockState", true, DataSourceUpdateMode.Never);
        }
    }
}

ViewModel
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Telerik.WinControls.UI.Docking;
 
namespace RadDockMemoryTest.ViewModel
{
    public class MainViewModel : ViewModelBase
    {
        private DockState toolWindow1DockState;
        /// <summary>
        /// Controls toolWindow1's dock state
        /// </summary>
        public DockState ToolWindow1DockState
        {
            get { return toolWindow1DockState; }
            set
            {
                toolWindow1DockState = value;
                OnPropertyChanged("ToolWindow1DockState");
            }
        }
    }
}

I setup a Window's automation tool to execute the following sequence:
1. Click "Auto-hide" on the docked ToolWindow.
2. Click the ToolWindow tab.
3. Click "Docked" to restore the ToolWindow to its docked state.

After letting the automation run overnight and observing memory processes in Windows Task Manager, I noticed the application's memory usage jumped from 32,000KB to 800,000KB.

How can I avoid the memory leak?

Thanks,
Eljay
Eljay
Top achievements
Rank 1
 answered on 20 Jan 2012
1 answer
94 views
Hi,
I have a aesthetical issue when editing the grid which can be seen in the Q3 SP1 demos under Columns, Grid Views.  If you change the view to TableView and click in the Phone Column, the grid slightly "jumps" to the left.  If you then click in the ID Column, the grid slightly "jumps" to the right.  This is most noticeable if you look at the column headers.

Any ideas?

Thanks,
David A.
Jack
Telerik team
 answered on 20 Jan 2012
4 answers
258 views
Hi is there a way to loop through listview customvisualitems and reach lightvisualelements in order to set visiblity for example
structure of my listview goes like that :
radlistview ---->customvisualitem---->stacklayoutpanel---->lightvisualelement1,lighvisualelement2
so my problem is that i need the right code in order to reach lightvisualelements and apply action on them.
if there any code that helps i appreciate help .
Best Regards, jack
Ivan Todorov
Telerik team
 answered on 20 Jan 2012
8 answers
142 views

Hi
I would like to build an application like the Integration Business cards example Could you tell me how to construct or add a gallery to a form?

Ivan Todorov
Telerik team
 answered on 20 Jan 2012
3 answers
231 views
Hello,

I am trying to divide the column header of some columns in two with the HtmlViewDefinition of the RadGridView. My table is not so complex for the moment but I just can't make it work....

I attached an Excel file screenshot to this message so you can have a look to what I want to do and below is the code I wrote so far:

radGridViewSaleReport.DataSource = myList; //binding list
 
 
HtmlViewDefinition view = new HtmlViewDefinition();
 
view.RowTemplate.Rows.Add(new RowDefinition());
view.RowTemplate.Rows.Add(new RowDefinition());
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Customer Name"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Unit"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Unit Type"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Unit Area"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Price/Sq.M."));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Selling Price"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Initial booking"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Booking"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Signing Contract"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Contract signed"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Transfer"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Sale"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Comment"));
view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Amount"));
view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Date"));
view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Amount"));
view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Date"));
view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Amount"));
view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Date"));
view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Amount"));
view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Date"));
 
view.RowTemplate.Rows[0].Cells[0].RowSpan = 2;
view.RowTemplate.Rows[0].Cells[1].RowSpan = 2;
view.RowTemplate.Rows[0].Cells[2].RowSpan = 2;
view.RowTemplate.Rows[0].Cells[3].RowSpan = 2;
view.RowTemplate.Rows[0].Cells[4].RowSpan = 2;
view.RowTemplate.Rows[0].Cells[5].RowSpan = 2;
view.RowTemplate.Rows[0].Cells[9].RowSpan = 2;
view.RowTemplate.Rows[0].Cells[11].RowSpan = 2;
view.RowTemplate.Rows[0].Cells[12].RowSpan = 2;
view.RowTemplate.Rows[0].Cells[6].ColSpan = 2;
view.RowTemplate.Rows[0].Cells[7].ColSpan = 2;
view.RowTemplate.Rows[0].Cells[8].ColSpan = 2;
view.RowTemplate.Rows[0].Cells[10].ColSpan = 2;
 
radGridViewSaleReport.Update();
this.radGridViewSaleReport.ViewDefinition = view;
this.radGridViewSaleReport.TableElement.CellSpacing = -1;
this.radGridViewSaleReport.TableElement.RowSpacing = -1;

I have a binding list full of data in it which I give to the radgridview and then I define the view and apply the view to the radgridview after updating it.

With this code, the radgridview look like the screenshot radgridview result.

Any idea how to display the data correctly into the radgridview?

Thanks,
LB
Jack
Telerik team
 answered on 20 Jan 2012
1 answer
136 views
Hello,
I downloaded Telerik Q2 2011 Demos and Telerik reporting Q2 2011 Demos , and I created a C# winform project (about 30 Radforms including Radcontrols and 10 telerik reports).
Due to some reasons, I decided to uninstall both telerik and telerik reporting.
the problem is how can i change or convert my projectcontrols and forms from Radcontrols and Radforms to the standard Microsoft controls, without rebuilding it from scratch using the standard Microsoft controls and styles provided by Visual Studio.

If there's a manual way to do it I am okay with it, I am sure it would be better than writing everything from scratch.

Thanks in advanced 

Jack
Telerik team
 answered on 20 Jan 2012
9 answers
1.6K+ views
Hi,

I want to set the style of a grid cell at runtime. I am passing the radgridview control as a reference to a helper class and based on some values i am setting the background color of a cell as follows, but it does not work.

radGrid.Rows[1].Cells[1].Style.BackColor = System.Drawing.Color.Red;

Whereas setting the ForeColor the same way works.

radGrid.Rows[1].Cells[1].Style.ForeColor = System.Drawing.Color.Red;


Please advice.
thanks
Nikolay
Telerik team
 answered on 20 Jan 2012
7 answers
173 views
Hi there,

I have just upgraded my project to Q3 2011 controls and I'm having a problem with theme rendering.
I'm probably missing something really obvious, but I've tried as much as I can to fix it and nothing is helping.
Here's the situation:

Winform project (vs.net 2010/.net 4.0)
Upgraded to Q3 controls (still have the Q2 tools installed), ran the Telerik upgrade wizard inside Visual Studio - everything finished fine, ALL Telerik references are pointing to 2011.3.11.1116 versions of the .dll's.
There are no compilation errors or warnings at all in my project.

The problem is that the themes don't render correctly at run time - almost like the themes are missing or something. I've added the TelerikMetroBlueTheme control to my radform, set the theme properties for the form and the controls to that Theme, but at runtime, there's no close/min/max buttons on the form and the other controls on the form aren't rendering correctly.

Attached is a screenshot of what the designtime and runtime rendering looks like. The runtime is obviously not rendering correctly.

If I create a brand new project and add a theme and a form, then it renders correctly - just not for my existing project for some reason. Is Telerik hanging on to something somewhere, or could you point me in the right direction of where to look. Not had this issue before.
Nikolay
Telerik team
 answered on 20 Jan 2012
1 answer
102 views
Hi,
I was just wondering if it was possible to reduce the size of Telerik dll...

I even don't know if I have access to SourceCode but I guess I have.

If I have, knowing I only use:
RibbonBar control and its childs
RadLabel
RadTextBox
RadListView
RadDropDown
RadButton
Theme

Would it be possible to clean the dll of all others non dependant controls to have a lighter assembly?
Nikolay
Telerik team
 answered on 19 Jan 2012
3 answers
84 views
Hi
i am using chart control with legends.
is RighttoLeft property available for chart control.
when i set RightToLeft, the legend should be displayed at left side.

please find the attached screen shot for my requirement. i need to move atleast legend

Thanks
hema

Evgenia
Telerik team
 answered on 19 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)
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
ProgressBar
CheckedDropDownList
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?