Telerik Forums
UI for WinForms Forum
2 answers
86 views
Hello, 

I'm using a RadCalendar within my WinForms application, I'm having an issue setting the SelectedDates collections programmatically. The code below works only if I uncomment the statement dtDate = new DateTime(dtDate.Year, dtDate.Month, dtDate.Day);   It sets the dates and highlights them correctly when I have multiple dates. If I do not create an instance of a DateTime object as you see below the calendar seems to only accept the first date in my dataset.  This is odd since the DateTime.TryParse statement returns a valid datetime into dtDate variable and I feel its unnecessary to have to set it again.  Using VS2008 Framework 3.5 build 2011.3.11.1116.

DateTime dtDate;
foreach (DataRow rw in oDS.Tables[0].Rows)
 {
        DateTime.TryParse(rw["eDate"].ToString(), out dtDate);
       //dtDate = new DateTime(dtDate.Year, dtDate.Month, dtDate.Day);
        radCalendar1.SelectedDates.Add(dtDate);
}

Thanks Kerry
Kerry
Top achievements
Rank 1
 answered on 20 Feb 2012
5 answers
157 views
Hi.

I have a treeview and I need to impose more restrictions on the drag and drop action. For example, if the node and the target node are at different levels I cancel the drag and drop action using the DragEnding event.

But I need more. I have to know where the node is going to be dropped onto the target node( above, below, within). The node cann't become a child node for the target node.

Can I find out this within the DragEnding event?

Thanks.
Boryana
Telerik team
 answered on 20 Feb 2012
5 answers
1.5K+ views
Hello,

1. I'm having difficulties hiding a folder tree node.
Setting the visibility to collapsed of the NodeElement will make the rows of the tree overlapping each other. How can I resolve this?

private void SignalTreeView_NodeFormatting(object sender, TreeNodeFormattingEventArgs e)
        {
            DataRowView rowView = (DataRowView)e.Node.DataBoundItem;
            e.NodeElement.ImageElement.Image = (Image)rowView[TreeNodes.COL_ICON];
              
            TreeNode tn = rowView[TreeNodes.COL_ITEM] as TreeNode;
            if (tn is FolderNode && e.Node.Nodes.Count == 0)
            {
                e.NodeElement.Visibility = ElementVisibility.Collapsed;
            }
        }

See the attached image!

2. Another problem is that I'm not able to hide the folder nodes when all children are filtered out (using custom filter). Is there any way I can do this? Folders can be multilevel.

Best Regards,
Zoltán Nagy
Ivan Petrov
Telerik team
 answered on 20 Feb 2012
1 answer
121 views
I have a RadGridView with a GridViewDateTimeColumn added as follows

With radGridView

    Dim dtFromCol As New GridViewDateTimeColumn("FromDate")

 

    With dtFromCol

        .Format = DateTimePickerFormat.Custom

        .CustomFormat = "M/d/yy"    'I'm looking for the shortest date format, i.e. 1/1/12 or 12/31/12

        .Width = 70

    End With
    .Columns.Add(dtFromCol)
.
.Other columns follow
.
End With

When I click the cell I get the datetime picker & the date selected shows up in the desired format (M/d/yy) in the cell, but when I click or Tab away from the cell the cell value changes to a long date format like 2/14/2012 12:00:00 AM . I'm trying not to display the full year (2012) and I don't want the time.
I have tryed customizing the cell's editor in the CellEditorInitialized event or forcing the desired date into the cell in the CellValidated event to no avail. Thanks for any help.

 

 

 

 

 

 

 

 

           

 

 

 

 

 

Boryana
Telerik team
 answered on 20 Feb 2012
5 answers
176 views
Hi,
I have a radgridview setup wth a hierarchy. I would like this grid to refresh every ten seconds as new information could be added to the database from another source, so it needs to be kept up-to-date. I did have a timer which would fire every ten seconds which reloaded the data.

The only problem is, if I have a row expanded or select a row and the grid reloads the selected row is lost and the sub grids close. Is there any way I can  keep this open while the data refreshes? ie the new row would be added at the bottom?

I have followed the http://www.telerik.com/community/forums/winforms/gridview/radgridview-hierarchy-refreshing-hierarchy-grid-closes.aspx  example given when i debug the code  i can see it is storing the expanded rows but while Restoring 

if

 

 

(expanded.Contains(item.DataBoundItem))

 

{

item.IsExpanded =

 

true;

 

}


the condition is not satisfyting. Can U suggest Me How to do the above Task

Thanks 
Julian Benkov
Telerik team
 answered on 17 Feb 2012
5 answers
289 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
100 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
254 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
543 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
116 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
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
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
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
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
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?