Telerik Forums
UI for WinForms Forum
3 answers
138 views
Hi,

Just want check with you guys, is it possible implement "Search" functionon RadSchedulerNavigator ? For example, search by "Subject"

Peter
Ivan Todorov
Telerik team
 answered on 25 Aug 2011
5 answers
142 views
E.g: 5 child nodes under a parent node. When try to reorder the child nodes, move 2nd node right above or right below 4th node, both of the actions, target node might be the 4th node based on users mouse behavior. How can we identity user wants to move the 2nd node above or below 4th node? 
Stefan
Telerik team
 answered on 25 Aug 2011
2 answers
142 views
Hi,

I have a problem on the CausesValidation between Main Form and Child Form. 
In the Main Form (midChildContainer form), I have a commandbar control with 2 buttons.  When those buttons are clicked, a function in Child Form will be involved. 

However, I want the validating event in the child form to be triggered when the first button in Main Form is clicked.  When, the other button is clicked, the validating event should not be fired.

I tried to set the causesvalidation in CommandBar to False.  Then, whatever buttons is clicked, the validating event never fire. 
Is there any way to do?  Thanks!

The following is the code:

Main Form Designer:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class FrmMainMenu
    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.RadCommandBar1 = New Telerik.WinControls.UI.RadCommandBar()
        Me.CommandBarRowElement1 = New Telerik.WinControls.UI.CommandBarRowElement()
        Me.CommandBarStripElement1 = New Telerik.WinControls.UI.CommandBarStripElement()
        Me.cmdButton = New Telerik.WinControls.UI.CommandBarButton()
        Me.cmdButton2 = New Telerik.WinControls.UI.CommandBarButton()
        CType(Me.RadCommandBar1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'RadCommandBar1
        '
        Me.RadCommandBar1.AutoSize = True
        Me.RadCommandBar1.CausesValidation = False
        Me.RadCommandBar1.Dock = System.Windows.Forms.DockStyle.Top
        Me.RadCommandBar1.Location = New System.Drawing.Point(0, 0)
        Me.RadCommandBar1.Name = "RadCommandBar1"
        Me.RadCommandBar1.Rows.AddRange(New Telerik.WinControls.UI.CommandBarRowElement() {Me.CommandBarRowElement1})
        Me.RadCommandBar1.Size = New System.Drawing.Size(579, 55)
        Me.RadCommandBar1.TabIndex = 1
        Me.RadCommandBar1.Text = "Without Validation"
        '
        'CommandBarRowElement1
        '
        Me.CommandBarRowElement1.DisplayName = Nothing
        Me.CommandBarRowElement1.MinSize = New System.Drawing.Size(25, 25)
        Me.CommandBarRowElement1.Strips.AddRange(New Telerik.WinControls.UI.CommandBarStripElement() {Me.CommandBarStripElement1})
        '
        'CommandBarStripElement1
        '
        Me.CommandBarStripElement1.DisplayName = "CommandBarStripElement1"
        Me.CommandBarStripElement1.FloatingForm = Nothing
        Me.CommandBarStripElement1.Items.AddRange(New Telerik.WinControls.UI.RadCommandBarBaseItem() {Me.cmdButton, Me.cmdButton2})
        Me.CommandBarStripElement1.Name = "CommandBarStripElement1"
        Me.CommandBarStripElement1.Text = ""
        '
        'cmdButton
        '
        Me.cmdButton.AccessibleDescription = "CommandBarButton1"
        Me.cmdButton.AccessibleName = "CommandBarButton1"
        Me.cmdButton.CanFocus = False
        Me.cmdButton.DisplayName = "Without Validation"
        Me.cmdButton.DrawText = True
        Me.cmdButton.Image = Nothing
        Me.cmdButton.ImageAlignment = System.Drawing.ContentAlignment.BottomRight
        Me.cmdButton.KeyTip = "WITHOUT VALIDATION"
        Me.cmdButton.Name = "cmdButton"
        Me.cmdButton.Text = "Without Validation"
        Me.cmdButton.TextImageRelation = System.Windows.Forms.TextImageRelation.TextAboveImage
        Me.cmdButton.Visibility = Telerik.WinControls.ElementVisibility.Visible
        Me.cmdButton.VisibleInOverflowMenu = True
        '
        'cmdButton2
        '
        Me.cmdButton2.AccessibleDescription = "With Validation"
        Me.cmdButton2.AccessibleName = "With Validation"
        Me.cmdButton2.CanFocus = False
        Me.cmdButton2.DisplayName = "CommandBarButton1"
        Me.cmdButton2.DrawText = True
        Me.cmdButton2.Image = Nothing
        Me.cmdButton2.Name = "cmdButton2"
        Me.cmdButton2.Text = "With Validation"
        Me.cmdButton2.Visibility = Telerik.WinControls.ElementVisibility.Visible
        Me.cmdButton2.VisibleInOverflowMenu = True
        '
        'FrmMainMenu
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(579, 579)
        Me.Controls.Add(Me.RadCommandBar1)
        Me.IsMdiContainer = True
        Me.Name = "FrmMainMenu"
        '
        '
        '
        Me.RootElement.ApplyShapeToControl = True
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "FrmMainMenu"
        Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
        CType(Me.RadCommandBar1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)
        Me.PerformLayout()
 
    End Sub
    Friend WithEvents RadCommandBar1 As Telerik.WinControls.UI.RadCommandBar
    Friend WithEvents CommandBarRowElement1 As Telerik.WinControls.UI.CommandBarRowElement
    Friend WithEvents CommandBarStripElement1 As Telerik.WinControls.UI.CommandBarStripElement
    Friend WithEvents cmdButton As Telerik.WinControls.UI.CommandBarButton
    Friend WithEvents cmdButton2 As Telerik.WinControls.UI.CommandBarButton
End Class

Main Form Code:
Public Class FrmMainMenu
    Private frmChild As FrmChild
    Private currentForm As Object
 
    Private Sub FrmMainMenu_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        frmChild = New FrmChild
        frmChild.Top = 0
        frmChild.Left = 0
        frmChild.MdiParent = Me
        frmChild.Show()
    End Sub
 
    Private Sub cmdButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdButton.Click
        currentForm = Me.ActiveMdiChild
        currentForm.WithoutValidationClick()
    End Sub
 
    Private Sub cmdButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdButton2.Click
        currentForm = Me.ActiveMdiChild
        currentForm.WithValidationClick()
    End Sub
 
    Private Sub cmdButton2_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdButton2.MouseHover
        RadCommandBar1.CausesValidation = True
    End Sub
 
    Private Sub cmdButton2_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdButton2.MouseLeave
        RadCommandBar1.CausesValidation = False
    End Sub
End Class

Child Form Designer: 
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class FrmChild
    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.RadTextBox1 = New Telerik.WinControls.UI.RadTextBox()
        Me.RadLabel1 = New Telerik.WinControls.UI.RadLabel()
        CType(Me.RadTextBox1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.RadLabel1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'RadTextBox1
        '
        Me.RadTextBox1.Location = New System.Drawing.Point(13, 36)
        Me.RadTextBox1.Name = "RadTextBox1"
        Me.RadTextBox1.Size = New System.Drawing.Size(198, 20)
        Me.RadTextBox1.TabIndex = 0
        Me.RadTextBox1.TabStop = False
        Me.RadTextBox1.Text = "123"
        '
        'RadLabel1
        '
        Me.RadLabel1.Location = New System.Drawing.Point(13, 12)
        Me.RadLabel1.Name = "RadLabel1"
        Me.RadLabel1.Size = New System.Drawing.Size(153, 18)
        Me.RadLabel1.TabIndex = 1
        Me.RadLabel1.Text = "Only ABC is an validate input."
        '
        'FrmChild
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.CausesValidation = False
        Me.ClientSize = New System.Drawing.Size(293, 82)
        Me.Controls.Add(Me.RadTextBox1)
        Me.Controls.Add(Me.RadLabel1)
        Me.Name = "FrmChild"
        '
        '
        '
        Me.RootElement.ApplyShapeToControl = True
        Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual
        Me.Text = "FrmChild"
        CType(Me.RadTextBox1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.RadLabel1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)
        Me.PerformLayout()
 
    End Sub
    Friend WithEvents RadTextBox1 As Telerik.WinControls.UI.RadTextBox
    Friend WithEvents RadLabel1 As Telerik.WinControls.UI.RadLabel
End Class

Child Form Code:
Public Class FrmChild
    Private oParent As Object
 
    Public Sub WithoutValidationClick()
        MessageBox.Show("Without Validation Click from Main Menu.")
    End Sub
 
    Public Sub WithValidationClick()
        MessageBox.Show("With Validation Click from Main Menu.")
    End Sub
 
    Private Sub RadTextBox1_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles RadTextBox1.Validating
        If RadTextBox1.Text <> "ABC" Then
            MessageBox.Show("Invalid input.")
        End If
    End Sub
 
    Private Sub FrmChild_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        oParent = Me.MdiParent
    End Sub
End Class

Emily
Emily Fong
Top achievements
Rank 1
 answered on 25 Aug 2011
1 answer
219 views
Is there a RadControl for WinForms that will do this?

When I google on this, I see examples on how to program the default PictureBox control that ships with Visual Studio, but I was wondering if there was an existing RadControl that can already do this, and save myself some development time.

Thanks
Richard Slade
Top achievements
Rank 2
 answered on 25 Aug 2011
1 answer
234 views
Hello, I'm trying to create a grid that allows editing when I click a command column button but only for that row, all other rows should stay read-only to reduce human error.  Any ideas?

Thanks,
Jason
Stefan
Telerik team
 answered on 25 Aug 2011
5 answers
130 views
I have a grid view, which values can be edited by the user. I want to refresh the content of the grid, if the user changes the value of the cell. So say I have : 

1, 2, 3 as the initial state. If the user changes the value 2 to 5, i want the values in the grid to show , 1,5,6. ( this is a new list that's get assigned as data source to the gridview )

My understanding is that in order to refresh the grid. One has to create a new reference of the list and reasign it to the data source. 

When this is done in the CellValueChanged event, the gridview crashes, with the following error. 

How does one refresh the grid view after a value has changed ? 

- Thanks 

Steps to get the error : 

1. Create a GridView 
2. Assign it for data source a list of your favorite object. Strings or what not. 
3. Add a handler for the CellValueChanged. 
4. On the CellValueChanged handler, asign a new list of strings of your  to the grid's data source. 
5. Build start. Edit a cell, and hit enter. 

Error Message. 

   at Telerik.WinControls.UI.GridViewEditManager.EndEditCore(Boolean validate, Boolean cancel)
   at Telerik.WinControls.UI.GridViewEditManager.EndEdit()
   at Telerik.WinControls.UI.RadGridViewElement.EndEdit()
   at Telerik.WinControls.UI.GridRowBehavior.ProcessEnterKey(KeyEventArgs keys)
   at Telerik.WinControls.UI.GridRowBehavior.ProcessKey(KeyEventArgs keys)
   at Telerik.WinControls.UI.BaseGridBehavior.ProcessKey(KeyEventArgs keys)
   at Telerik.WinControls.UI.BaseGridBehavior.ProcessKeyDown(KeyEventArgs keys)
   at Telerik.WinControls.UI.BaseGridEditor.OnKeyDown(KeyEventArgs keyEventArgs)
   at Telerik.WinControls.UI.GridSpinEditor.OnKeyDown(KeyEventArgs e)
   at Telerik.WinControls.UI.GridSpinEditor.spinElement_KeyDown(Object sender, KeyEventArgs e)
   at Telerik.WinControls.RadItem.OnKeyDown(KeyEventArgs e)
   at Telerik.WinControls.UI.RadSpinElement.OnKeyDown(KeyEventArgs e)
   at Telerik.WinControls.UI.RadSpinElement.textItem_KeyDown(Object sender, KeyEventArgs e)
   at Telerik.WinControls.RadItem.OnKeyDown(KeyEventArgs e)
   at Telerik.WinControls.UI.RadTextBoxItem.TextBoxControl_KeyDown(Object sender, KeyEventArgs e)
   at System.Windows.Forms.Control.OnKeyDown(KeyEventArgs e)
   at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
   at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
   at System.Windows.Forms.Control.WmKeyChar(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
   at System.Windows.Forms.TextBox.WndProc(Message& m)
   at Telerik.WinControls.UI.HostedTextBoxBase.WndProc(Message& message)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at Watson.ModelingTool.Main() in C:\Development\Watson\GL.Desktop\ModelingTool\ModelingTool.cs:line 45
Erion
Top achievements
Rank 1
 answered on 24 Aug 2011
2 answers
203 views
Hey at Telerik

I have a problem when binding gridview to a List<Car>.
The Car object contains two objects Engine and CarColor.

If an Engine or CarColor is initialized on the car object the e.Value in the

 

rgvCars_CellEndEdit event is correctly changed and parsed and object is updated.

If no Engine or CarColor object is initialized on the Car object and i try to set for instance and engine in the combobox, the e.Value in  the rgvCars_CellEndEdit event is null and the object is not updated.

How do i set an Engine or CarColor on the Car object if there's no Engine or CarColor initialized ??

I have include an example (Without an assembly) that shows the problem at hand when you try to select for intance an Engine on the Car that doesn't have an Engine object initialzed.

Link to example. http://kort2.lifa.dk/Examples/GridViewCellEndEditIssue.zip

Sincerly Jan

Stefan
Telerik team
 answered on 24 Aug 2011
1 answer
182 views
Hi, I have a button and I have setted up an image that is bigger than the button.
Is there a posibility from ImageScalingSize property to display the image at the same size like the button is?

Also I have attached an image
Thanks
Stefan
Telerik team
 answered on 24 Aug 2011
1 answer
57 views

Hi all,
I using wraptext to format a header like:
rgvBob.Columns(6).Width = 60
rgvBob.Columns(6).HeaderText = "Internal Diameter"
rgvBob.Columns(6).WrapText = True

and the grid works fine, but when I use a ViewDefinition in my grid, the propertie wraptext above is ignored and the header doesn´t show the text in 2 lines.
There are some properties in ViewDefinition to do a wraptext in header?

tks,
Nelson




Martin Vasilev
Telerik team
 answered on 24 Aug 2011
3 answers
204 views
How can I stop the items in the carousel from rotating?

I tried setting AnimationsToApply to None, but then all my items appeared stacked on top of each other. I also tried setting EnableLooping to False, and that seemed to do the trick. After selecting an Item I'd display a form, when the user closed the form, the carousel was no longer rotating (or looping), however, one slight issue occurred-- two of the items appeared stacked on top of each other.

I want the items to appear in a carousel-like circle, but I just don't want them to rotate, because some of my users are finding it annoying.

Stefan
Telerik team
 answered on 24 Aug 2011
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
CheckedDropDownList
ProgressBar
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
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
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
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?