Telerik Forums
UI for WinForms Forum
4 answers
149 views
Hi,

I was trying to add a custom field to the EditAppointment dialog of  my scheduler. The field is a combobox and I can select a value, but the mapping doesn't work, its always null. Here are some code snippets:

MainForm:
Public Sub New()
    InitializeComponent()
  
    AddHandler Me.RadScheduler.AppointmentEditDialogShowing, AddressOf RadScheduler_AppointmentEditDialogShowing
  
    Me.RadScheduler.AppointmentFactory = New AppointmentWithNewFieldsFactory
    Me.SchedulerBindingDataSource1.EventProvider.AppointmentFactory = New AppointmentWithNewFieldsFactory
  
    Dim appointmentMappingInfo As AppointmentMappingInfo = TryCast(Me.SchedulerBindingDataSource1.EventProvider.Mapping, AppointmentMappingInfo)
    appointmentMappingInfo.Mappings.Add(New SchedulerMapping("CustomField", "CustomFieldDatabase"))
End Sub
 
    Private appointmentDialog As IEditAppointmentDialog = Nothing
    Private Sub RadScheduler_AppointmentEditDialogShowing(sender As Object, e As AppointmentEditDialogShowingEventArgs) Handles RadScheduler.AppointmentEditDialogShowing
        If Me.appointmentDialog Is Nothing Then
            Me.appointmentDialog = New AppointmentWithNewFieldsEditForm()
        End If
        e.AppointmentEditDialog = Me.appointmentDialog
    End Sub

AppointmentWithNewFields Class:
Imports Telerik.WinControls.UI
 
Public Class AppointmentWithNewFields
    Inherits Appointment
 
    Public Sub New()
        MyBase.New()
    End Sub
 
    Private _CustomField As Integer
 
    Public Property CustomField() As Integer
        Get
            Return Me._CustomField
        End Get
        Set(value As Integer)
            If Me._CustomField <> value Then
                Me._CustomField = value
                Me.OnPropertyChanged("CustomField")
            End If
        End Set
    End Property

AppointmentWithNewFieldsEditForm
Imports Telerik.WinControls.UI
 
Public Class AppointmentWithNewFieldsEditForm
    Inherits Telerik.WinControls.UI.Scheduler.Dialogs.EditAppointmentDialog
 
    Public Sub New()
        InitializeComponent()
    End Sub
 
    Protected Overrides Sub LoadSettingsFromEvent(ByVal ev As IEvent)
        MyBase.LoadSettingsFromEvent(ev)
 
        Dim appointmentWithNewFields As AppointmentWithNewFields = TryCast(ev, AppointmentWithNewFields)
        If appointmentWithNewFields IsNot Nothing Then
            Me.ComboBoxCustomField.SelectedValue = appointmentWithNewFields.CustomField
        End If
    End Sub
 
    Protected Overrides Sub ApplySettingsToEvent(ByVal ev As IEvent)
        Dim appointmentWithNewFields As AppointmentWithNewFields = TryCast(ev, AppointmentWithNewFields)
        If appointmentWithNewFields IsNot Nothing Then
            appointmentWithNewFields.CustomField= Me.ComboBoxCustomField.SelectedValue
        End If
        MyBase.ApplySettingsToEvent(ev)
    End Sub
 
    Protected Overrides Function CreateNewEvent() As IEvent
        Return New AppointmentWithNewFields()
    End Function

AppointmentsWithNewFieldsFactory:
Imports Telerik.WinControls.UI
 
Public Class AppointmentWithNewFieldsFactory
    Implements IAppointmentFactory
#Region "IAppointmentFactory Members"
    Public Function CreateNewAppointment() As IEvent Implements IAppointmentFactory.CreateNewAppointment
        Return New AppointmentWithNewFields()
    End Function
#End Region
End Class

What did I wrong? Can anyone help me please?

Thanks + greetings

Daniel
George
Telerik team
 answered on 30 Apr 2014
2 answers
113 views
Hello,

I have a gridview that is grouped by a job number. I have all of the rows collapsed. I can expand a group and click on a row within and get the value of the job number. Is there any way of leaving it collapsed and clicking on the group header row and get the grouped value which is the job number for me? I tried and get the error of Object reference not set to an instance of an object. I assume because the cell for that name is not in the row. Is there a different way to get it?

Thanks,

Warren

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 Apr 2014
2 answers
152 views
Hi,

I have RadRichTextBox, and i want to set left,right,top and bottom anchor to my richtextbox. I chance properties and save and close the form. After that, when i open again that form, richtextbox disappear. 

Please check the video that below.

https://drive.google.com/file/d/0B3o1p85K5xQTRTBTNXg3eFFMOWc/edit?usp=sharing

Tanser
Top achievements
Rank 1
 answered on 28 Apr 2014
3 answers
121 views
I am using Visual Studio 2013 w/ Telerik 2014.1.402.40 for WinForms. I've been working on implementing the Save / Load layout functionality that comes with the RadGridView and everything is working great with the exception of one thing...

My grid has a System.Windows.Forms.ContextMenuStrip assigned to it. There are various items in the menu that do different things. When I load my grid it works find. If I save a layout, then load it back to the grid, the context menu still appears, but clicking items within it no longer work.

I opened one of the saved layouts and noticed it has a section in it relating to the contextmenustrip, but I don't understand this, or why saving the grid layout would affect the ContextMenuStrip that is assigned to it.

There must be something I'm missing, thanks for any info.

Matt
George
Telerik team
 answered on 25 Apr 2014
10 answers
368 views
Can I use the rotator to create a ticker on a window's program? (Ticker like the ticker on CNN at the bottom of the screen)

TIA - Jeff.
George
Telerik team
 answered on 25 Apr 2014
1 answer
436 views
Hi,

I'm using RadPropertyGrid and also the items consists of checkboxes.
So, does checkbox fire the event of EditorInitialized when clicked ?
Or maybe how do I invoke the event of EditorInitialized when using checkboxes in the PropertyGrid ?

Regards,
Daniel
Ralitsa
Telerik team
 answered on 25 Apr 2014
1 answer
210 views
I have 3 Images (as repository items) one for default, one for mouseOver and one for mouseDown. Each Image has the ImageLayout property set to "stretch" . Additionaly I have set the ImageLayout for the RadButton/RadButtonElement/ImagePrimitive to stretch. However, the Images refuse to stretch...

Any help would be appreciated.
George
Telerik team
 answered on 25 Apr 2014
1 answer
182 views
Hi,

I'm using a Grid with a summary row that I pin to the bottom:

myGrid.MasterView.SummaryRows[0].PinPosition = PinnedRowPostion.Bottom;

Which works great, but when I group on a column at runtime the summary row is no longer pinned.

Is this possible?

Thanks

Shaun.





George
Telerik team
 answered on 24 Apr 2014
5 answers
270 views
Hi,

The RadDateTimePicker does not resize when the screen is set to 125%.
In the attachment you can see the difference between the RadTextBox and the RadDateTimePicker.

Any ideas how to solve this?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Apr 2014
9 answers
630 views
Hi!

Is it possible to create a multicolumndropdown where the first column contains a checkbox.
The user can then select rows by checking the checkboxes.

Is this possible ?

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