Telerik Forums
UI for WinForms Forum
5 answers
292 views
Hi,

When using a node's Nodes.Clear() method the tree view scrolls up to the top and shows the tree view's first node.

If I load the Form2 and scroll down a bit so the first node is no longer visible, and check the check box, then double click on a node it will expand, and make the top node visible.

My work around is to remove each node individually, i.e.
If I load the Form2 and scroll down a bit so the first node is no longer visible, then double click on a node it will expand.

Public 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.RadTreeView1 = New Telerik.WinControls.UI.RadTreeView()
        Me.CheckBox1 = New System.Windows.Forms.CheckBox()
        CType(Me.RadTreeView1, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'RadTreeView1
        '
        Me.RadTreeView1.BackColor = System.Drawing.SystemColors.Control
        Me.RadTreeView1.Cursor = System.Windows.Forms.Cursors.Default
        Me.RadTreeView1.Font = New System.Drawing.Font("Segoe UI", 8.25!)
        Me.RadTreeView1.ForeColor = System.Drawing.Color.Black
        Me.RadTreeView1.Location = New System.Drawing.Point(12, 11)
        Me.RadTreeView1.Name = "RadTreeView1"
        Me.RadTreeView1.RightToLeft = System.Windows.Forms.RightToLeft.No
        '
        '
        '
        Me.RadTreeView1.RootElement.ForeColor = System.Drawing.Color.Black
        Me.RadTreeView1.Size = New System.Drawing.Size(150, 250)
        Me.RadTreeView1.SpacingBetweenNodes = -1
        Me.RadTreeView1.TabIndex = 3
        Me.RadTreeView1.Text = "RadTreeView1"
        '
        'CheckBox1
        '
        Me.CheckBox1.AutoSize = True
        Me.CheckBox1.Location = New System.Drawing.Point(168, 23)
        Me.CheckBox1.Name = "CheckBox1"
        Me.CheckBox1.Size = New System.Drawing.Size(81, 17)
        Me.CheckBox1.TabIndex = 4
        Me.CheckBox1.Text = "CheckBox1"
        Me.CheckBox1.UseVisualStyleBackColor = True
        '
        'Form2
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(292, 273)
        Me.Controls.Add(Me.CheckBox1)
        Me.Controls.Add(Me.RadTreeView1)
        Me.Name = "Form2"
        Me.Text = "Form2"
        CType(Me.RadTreeView1, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)
        Me.PerformLayout()
  
    End Sub
    Friend WithEvents RadTreeView1 As Telerik.WinControls.UI.RadTreeView
  
  
    Private Sub Form2_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        For i = 0 To 20
            Dim node = RadTreeView1.Nodes.Add("node " + i.ToString)
            For j = 0 To 20
                Dim n2 = node.Nodes.Add("node " + i.ToString + " " + j.ToString)
            Next
        Next
        RadTreeView1.LazyMode = True
    End Sub
  
  
    Private Sub RadTreeView1_NodeExpandedChanged(sender As System.Object, e As Telerik.WinControls.UI.RadTreeViewEventArgs) Handles RadTreeView1.NodeExpandedChanged
        Dim n = RadTreeView1.SelectedNode
        If n Is Nothing Then Return
        If CheckBox1.Checked Then
            n.Nodes.Clear()
        Else
            While n.Nodes.Count > 0
                n.Nodes.RemoveAt(0)
            End While
        End If
        For i = 0 To 10
            Dim node = n.Nodes.Add("Expando " + i.ToString)
        Next
    End Sub
End Class

My experience with .Net is 7 years. My experience with Rad is about 2 weeks.

  • OS version and applied service packs

Microsoft Windows Server 2003, Standard Edition, Service Pack 2

  • Regional and language settings, if different from En-US

English (Australia)

  • .NET version (.NET2, .NET3, .NET3.5)

.NET 4.0.30319 SP1Rel, Visual Studio 2010 Version 10.0.40219.1 SP1Rel

  • Exact version of the Telerik product 

Runtime Version v2.0.50727, Version 2011.2.11.831


Svett
Telerik team
 answered on 17 Feb 2012
1 answer
103 views
Hi,

We are a group of developers developing in various place and finally will merge all the forms in one place.

Let me know if a person developed an application using Telerik 2011 Q3
and another one developed using Telerik 2011 Q2
(For Example: we have totally 10 forms. 7 forms were designed in Telerik2011 Q3 and 3 were designed in Telerik2011 Q2
we like to open forms developed in Telerik2011 Q3 in a system having telerik 2011 Q2 )
if we do so. Its getting error. (please refer attached image file to see the error page)
I mean its getting error while merging Telerik 2011 Q3 with Telerik 2011 Q2

I request Telerik Support team to give a solution as quick as possible. 

Note: I have attached the Err.Page screen shot.

Please reply as soon as possible.
Regards,
Thiru.
Ivan Petrov
Telerik team
 answered on 17 Feb 2012
3 answers
258 views
I am using C++/CLI with the Telerik GridView.  I have a checkbox column which I wanted to add the CheckBoxHeaderCell class to.  (Reference: http://www.telerik.com/support/kb/winforms/gridview/add-check-uncheck-all-check-box-in-the-header-cell.aspx).  I wrote the example and compiled it in C++/CLI from the given C# code.  However, I do not know how to tell my grid view to USE this class as a columns header cell.  Any help would be appreciated!

- John


Stefan
Telerik team
 answered on 17 Feb 2012
6 answers
550 views

Hi,
I am displaying data in the grid as hierarchical form using a self reference, here treeview column is displayed in the first column as shown in attached screen shot1 but i need to display the treeview node in second column instead of first column as shown in attached screen shot 2. How can i achieve the output shown in screen shot 2?

Thanks..

Stefan
Telerik team
 answered on 17 Feb 2012
1 answer
120 views
How can I localize the RadListView?
For the RadGridView i use the "RadGridLocalizationProvider", but there is no corresponding class for the RadListView (or I can't find it).
Ivan Todorov
Telerik team
 answered on 17 Feb 2012
1 answer
153 views
Hi,

I have added a TypeConverter to my ComboBox column which converts from string to Value which will allow me to paste either the Int Value or the String Value into the Combobox. This is  all working fine.

What I would like to know is it possible to copy out the string Value using this, Or would I have to use an other method to do this.

In thought if I used ComboboxCell.Value.ToString() then it would convert the value to the String Version but it doesnt.

Thanks 

David
Svett
Telerik team
 answered on 17 Feb 2012
1 answer
268 views
Hi
i want to set work week as sunday. now my application it is displaying as monday. but i want to start work week as sunday-thrusday instead of monday-friday

Thanks
Hema
Ivan Todorov
Telerik team
 answered on 17 Feb 2012
1 answer
209 views
Hi,
I have a RadDropDownButton and am using the menum items as a checklist.  The problem is I would like to keep the drop down open until the button is clicked again to allow the user to select multiple items.

Is this possible?

Thank you,
David
Stefan
Telerik team
 answered on 16 Feb 2012
4 answers
250 views
Is there any way to get a buttons ID instead of just the Text.

I have a button Add under a "Pages" group and an Add under a "Users" group.   Just getting the text isn't good enough.

Is there a similar method to:  button.get_text()   such as  button.get_id() ???

Only code I could find in the help file was:
  var button = args.get_button();          
alert (button.get_text())

Thanks for the help.   If there isn't then would be good to add to the future feature list.

Thanks!
Kate
Telerik team
 answered on 16 Feb 2012
3 answers
292 views
In my case I want to scroll to the top row in certain circumstances.  The code that works isn't elegant as it will fire events that I really don't want.  To get around that I use a flag that I set before updating the grid, then reset after.  Here's the code:

            _fillingSearchGrid = true;
            SearchResultsGrid.DataSource = results;
            if (SearchResultsGrid.Rows.Count > 0)
            {
                SearchResultsGrid.CurrentRow = SearchResultsGrid.ChildRows[0];
                SearchResultsGrid.CurrentRow = null;
            }
            _fillingSearchGrid = false;

Is there a better way to do this?
Ivan Petrov
Telerik team
 answered on 16 Feb 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?