Telerik Forums
UI for WinForms Forum
3 answers
409 views

Hi,

My problem is with RadForm. When I create a descendant from RadForm and put on it many telerik components, then I see application memory is increasing every time I open that form. I have prepared a small example: there are two forms: first form is just standard .NET form with button to open RadForm and then ask GC about Total used memory. I have used version 2009.2.729 and the problem was with one form, which after 100 times of opening and closing results in about 2 gigabytes of allocated memory. I have checked the last version of Telerik WinForms 2009.3.9.1203, but it still allocates more memory every next time.

The explicit call to garbage collector does not help.

And why I can't attach zip file ?

You can download the zip archive (17 kb) from here http://rapidshare.com/files/367983868/TelerikCheck.zip.html

The single method I have write is following :

private void button1_Click(object sender, EventArgs e) {

  FormTelerik form = new FormTelerik();

  DialogResult res  =form.ShowDialog();

  form.Dispose();

  form = null;

  long bytes  = GC.GetTotalMemory(true);

  textBox1.Text = string.Format("{0:F3} Megabytes", 1.0*bytes/1024/1024);


Deyan
Telerik team
 answered on 12 Apr 2010
2 answers
449 views
Hi !

I have a grid and one of the column is multi column combo box. Everything works fine.
When I want to resize RadMultiColumnComboBoxElement, I found it particulary very hard.Is not working for example like rad grid in this code:
rdgv.MasterGridViewTemplate.BestFitColumns()

Practically I had to re size it manually.

This is my code and my question is ; Is any way to resize RadMultiColumnComboBoxElement like rad grid control, only specifying a property like BestFitColumns ?

My code for the grid and multicolumnComboBox column :

Private Sub ConfigureGridView(ByVal dtEmpJob As DataTable, ByVal dtListEmployees As DataTable)

        If dtEmpJob Is Nothing OrElse dtListEmployees Is Nothing Then
            Return
        End If

        rdgv.DataSource = dtEmpJob
        Me.rdgv.MasterGridViewTemplate.Columns("EmpNo").HeaderText = "Emp.No"
        Me.rdgv.MasterGridViewTemplate.Columns("Active").HeaderText = "Active"

        Dim col As GridViewDataColumn = TryCast(rdgv.MasterGridViewTemplate.Columns("EmpFullName"), GridViewDataColumn)

        If Not col Is Nothing Then
            rdgv.MasterGridViewTemplate.Columns.Remove(col)
        End If

        Dim col1 As GridViewMultiComboBoxColumn = New GridViewMultiComboBoxColumn
        col1.DataSource = dtListEmployees
        col1.DisplayMember = "EmpFullName"
        col1.ValueMember = "pEmployeeId"
        col1.FieldName = "EmpNo"
        col1.HeaderText = "Custom"
        rdgv.MasterGridViewTemplate.Columns.Add(col1)
        AddHandler rdgv.CellBeginEdit, AddressOf rdgv_CellBeginEdit

        rdgv.MasterGridViewTemplate.BestFitColumns()

        Me.rdgv.MasterGridViewTemplate.Columns("EmpNo").Index = 0
        Me.rdgv.MasterGridViewTemplate.Columns("EmpNo1").Index = 1
        Me.rdgv.MasterGridViewTemplate.Columns("Active").Index = 2
    End Sub


    Private isColumnAdded As Boolean
--------------------------------------the  CODE WHERE I HAD TO RESIZE MULTICOLUMN COMBOBOX----------------------------------------------
    Private Sub rdgv_CellBeginEdit(ByVal sender As Object, ByVal e As GridViewCellCancelEventArgs)
        If TypeOf Me.rdgv.CurrentColumn Is GridViewMultiComboBoxColumn Then
            If (Not isColumnAdded) Then
                isColumnAdded = True

                Dim multiColumnComboElement As RadMultiColumnComboBoxElement = CType(Me.rdgv.ActiveEditor, RadMultiColumnComboBoxElement)
                multiColumnComboElement.EditorControl.MasterGridViewTemplate.AutoGenerateColumns = False

                multiColumnComboElement.DropDownSizingMode = SizingMode.UpDownAndRightBottom
                multiColumnComboElement.DropDownMinSize = New Size(300, 100)

                Dim column As New GridViewTextBoxColumn("pEmployeeId")
                column.HeaderText = "Emp No"
                column.Width = 60
                multiColumnComboElement.Columns.Add(column)
                column = New GridViewTextBoxColumn("EmpFullName")
                column.HeaderText = "Employee"
                column.Width = 120
                multiColumnComboElement.Columns.Add(column)

                multiColumnComboElement.BestFitColumns()
                multiColumnComboElement.AutoSizeDropDownToBestFit = True

            End If
        End If
    End Sub


Regards,
Mihai








Mihai Velicu
Top achievements
Rank 1
 answered on 09 Apr 2010
1 answer
576 views
I would like to create a new a new user control taht consists of a RadLabel and RadCombo box control. When I click add User Control, I do not see a template for a "Telerik Rad User Control". If I create a regular user control and try to change it's inheritance from UserControl to RadControl or even RadCustomControl I can't work with the result. Suggestions on how to do this?
Nikolay
Telerik team
 answered on 09 Apr 2010
2 answers
139 views
What is the best way to get the max levels of a treeview instead of looping throw the nodes.  Is there a property in the control that gets the max levels or should I just create a recursive function to loop through each node for children?

thanks Stephen
steve
Top achievements
Rank 1
 answered on 09 Apr 2010
3 answers
130 views
In version Q1 2010 there is no DataSource field for GridViewComboBox in Property builder.
Julian Benkov
Telerik team
 answered on 09 Apr 2010
1 answer
175 views
Hello,

I have a radDataGrid and the source is a List<customerClass>, where curstomer class have nullable fields ( DateTime? and int? ).
When i want to set the filter in the filterRow on such a column I get the following exception.

How can I make the filter working on such columns?

Regards
Roland



System.InvalidCastException wurde nicht behandelt.

Message=

"Ungltige Umwandlung von \"System.DateTime\" in \"System.Nullable`1[[System.DateTime, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]\"."

 

Source=

"mscorlib"

 

StackTrace:

bei System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)

bei System.DateTime.System.IConvertible.ToType(Type type, IFormatProvider provider)

bei System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)

bei Telerik.WinControls.UI.GridFilterCellElement.SetFilterValue(Object value)

bei Telerik.WinControls.UI.GridFilterCellElement.set_Value(Object value)

bei Telerik.WinControls.UI.RadGridView.UpdateFiltering()

Martin Vasilev
Telerik team
 answered on 09 Apr 2010
1 answer
250 views

What I am trying to do is to change the style/coloring of a RadMenuItem.  I want the left side of the menu to have a different coloring style then of the whole RadMenuItem, left section meaning the section that contains the icons/images of the menu item.


When I set the  below properties it changes the whole item.

        CType(MenuControl.GetChildAt(0), Telerik.WinControls.Primitives.FillPrimitive).BackColor = System.Drawing.Color.FromArgb(CType(CType(215, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))

        CType(MenuControl.GetChildAt(0), Telerik.WinControls.Primitives.FillPrimitive).BackColor2 = System.Drawing.Color.FromArgb(CType(CType(132, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(78, Byte), Integer))

        CType(MenuControl.GetChildAt(0), Telerik.WinControls.Primitives.FillPrimitive).BackColor3 = System.Drawing.Color.FromArgb(CType(CType(63, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(10, Byte), Integer))

        CType(MenuControl.GetChildAt(0), Telerik.WinControls.Primitives.FillPrimitive).BackColor4 = System.Drawing.Color.FromArgb(CType(CType(78, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))

 

Thanks in advance for your help.

Nikolay
Telerik team
 answered on 09 Apr 2010
11 answers
620 views
hi Guys,

Sorry i m quite new to the Telerik RadControls.
I have a terrible issue with the autosize property of the RadGridview for winforms.

I set my AutoSizeRows to True at design time and autosize columns mode = none.

then in  my code..
MYGridView.DataSource = dataSet.Tables[0].DefaultView;
MYGridView.Columns["Comments"].MaxWidth = 500;
MYGridView.Columns["Comments"].WrapText = true;
    foreach (Telerik.WinControls.UI.GridViewDataColumn item in MYGridView.Columns)
                    {
                        item.BestFit();
                    }
And after this. i when i look at my girdview its autosized its contents to the size of of the font in the cells. which is very very ugly.
i want to set a minHeight for the columns but i am unable to do so.. please help...

i have tried what is discussed in these threads but of now use.

http://www.telerik.com/community/forums/winforms/gridview/wraptext-and-autosizerows-true.aspx
http://www.telerik.com/community/forums/winforms/gridview/wrapping-text-in-cell.aspx

Please give me your valuable suggestions.

Thanks in advance.



Svett
Telerik team
 answered on 09 Apr 2010
0 answers
141 views
...
Mike Baldini
Top achievements
Rank 2
 asked on 08 Apr 2010
8 answers
355 views
hi
i am using telerik rad control winforms q1 2010 with visual studio 2005, when i am run the telerik visual style builder it display an error message "Telerik.VisualStyleBuilder has encountered a problem and needs to close. we are sorry for the inconvenience.
what is the reason for display the error message?
plz help me, its very urgent

jack jai
Top achievements
Rank 1
 answered on 08 Apr 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)
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
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?