Telerik Forums
UI for WinForms Forum
16 answers
900 views
Hi Admin,

I want to know about how to get resource related to the current cell of radscheduler.
I want to pass the ID of selected resource to my custom New/Edit Appointment Form to fill the resource combo box.

I am looking forward to hearing from you as soon as possible.

Thank you in advance.

best regard.

Kian
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 08 Dec 2015
2 answers
602 views
I have a RadGridView that I populate with a DataTable. One of the fields that is in the DataTable is a column that contains boolean values. Instead of showing "True" or "False" in the column like it does now, I want it to show "In" or "Out". What is the simplest way to accomplish this? I am using Visual Studio 2013 and programming in Visual Basic. Thanks!
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 08 Dec 2015
1 answer
124 views

i'm attempting to give the option to users to export all or page only, but I can't get the syntax of the statement correct.. I would have thought it to be..

 

 spreadExporter.PagingExportOption.CurrentPageOnly = 0

 

 spreadExporter.PagingExportOption.AllPages = 1

Jai
Top achievements
Rank 1
 answered on 07 Dec 2015
1 answer
182 views

Hi,

I have a radRibbonForm.

When I change the Theme of the radRibbon the control box vanishes, so no minimize, maximize or close button. If you hover the mouse over the area where they should be the tooltip appears - and you can actually click either of the three buttons. They are just not displayed.

If I turn the theme back to controlDefault the control box appears as normal.

Any ideas folks?

Ralitsa
Telerik team
 answered on 07 Dec 2015
1 answer
116 views

I cannot make same width for first and second buttons and thumb. There is always right margins in the buttons. The below is my coding:
            this.PanelElement.Fill.BackColor = Color.Transparent;
            this.PanelElement.Fill.GradientStyle = GradientStyles.Solid;
            this.RootElement.BackColor = Color.Transparent;
            this.RootElement.ForeColor = Color.Transparent;
            ((FillPrimitive)this.VerticalScrollbar.ScrollBarElement.Children[1]).GradientStyle = GradientStyles.Solid;
            ((FillPrimitive)this.VerticalScrollbar.ScrollBarElement.Children[1]).BackColor = FXStyle.ColorForKey("ScrollBarBackColor");
            this.VerticalScrollbar.ScrollBarElement.FirstButton.ButtonBorder.FitToSizeMode = RadFitToSizeMode.FitToParentContent;
            this.VerticalScrollbar.ScrollBarElement.FirstButton.ButtonFill.GradientStyle = GradientStyles.Solid;
            this.VerticalScrollbar.ScrollBarElement.FirstButton.ButtonFill.BackColor = FXStyle.ColorForKey("ScrollBarButtonBackColor");
            this.VerticalScrollbar.ScrollBarElement.FirstButton.ArrowPrimitive.ForeColor = FXStyle.ColorForKey("ScrollBarButtonArrowBackColor");
            this.VerticalScrollbar.ScrollBarElement.FirstButton.ButtonBorder.BoxStyle = BorderBoxStyle.FourBorders;
            this.VerticalScrollbar.ScrollBarElement.FirstButton.ButtonBorder.LeftColor = FXStyle.ColorForKey("ScrollBarButtonLeftTopBorderColor");
            this.VerticalScrollbar.ScrollBarElement.FirstButton.ButtonBorder.LeftShadowColor = FXStyle.ColorForKey("ScrollBarButtonLeftTopBorderColor");
            this.VerticalScrollbar.ScrollBarElement.FirstButton.ButtonBorder.LeftWidth = 1;
            this.VerticalScrollbar.ScrollBarElement.FirstButton.ButtonBorder.TopColor = Color.Yellow;
            this.VerticalScrollbar.ScrollBarElement.FirstButton.ButtonBorder.TopShadowColor = Color.Yellow;
            this.VerticalScrollbar.ScrollBarElement.FirstButton.ButtonBorder.TopWidth = 1;
            this.VerticalScrollbar.ScrollBarElement.FirstButton.ButtonBorder.RightColor = FXStyle.ColorForKey("ScrollBarButtonRightBottomBorderColor");
            this.VerticalScrollbar.ScrollBarElement.FirstButton.ButtonBorder.RightShadowColor = FXStyle.ColorForKey("ScrollBarButtonRightBottomBorderColor");
            this.VerticalScrollbar.ScrollBarElement.FirstButton.ButtonBorder.RightWidth = 1;
            this.VerticalScrollbar.ScrollBarElement.FirstButton.ButtonBorder.BottomColor = Color.Red;
            this.VerticalScrollbar.ScrollBarElement.FirstButton.ButtonBorder.BottomShadowColor = Color.Red;
            this.VerticalScrollbar.ScrollBarElement.FirstButton.ButtonBorder.BottomWidth = 1;

            this.VerticalScrollbar.ScrollBarElement.SecondButton.ButtonBorder.FitToSizeMode = RadFitToSizeMode.FitToParentContent;
            this.VerticalScrollbar.ScrollBarElement.SecondButton.ButtonFill.GradientStyle = GradientStyles.Solid;
            this.VerticalScrollbar.ScrollBarElement.SecondButton.ButtonFill.BackColor = FXStyle.ColorForKey("ScrollBarButtonBackColor");
            this.VerticalScrollbar.ScrollBarElement.SecondButton.ArrowPrimitive.ForeColor = FXStyle.ColorForKey("ScrollBarButtonArrowBackColor");
            this.VerticalScrollbar.ScrollBarElement.SecondButton.ButtonBorder.BoxStyle = BorderBoxStyle.FourBorders;
            this.VerticalScrollbar.ScrollBarElement.SecondButton.ButtonBorder.LeftColor = FXStyle.ColorForKey("ScrollBarButtonLeftTopBorderColor");
            this.VerticalScrollbar.ScrollBarElement.SecondButton.ButtonBorder.LeftShadowColor = FXStyle.ColorForKey("ScrollBarButtonLeftTopBorderColor");
            this.VerticalScrollbar.ScrollBarElement.SecondButton.ButtonBorder.LeftWidth = 1;
            this.VerticalScrollbar.ScrollBarElement.SecondButton.ButtonBorder.TopColor = Color.Yellow;
            this.VerticalScrollbar.ScrollBarElement.SecondButton.ButtonBorder.TopShadowColor = Color.Yellow;
            this.VerticalScrollbar.ScrollBarElement.SecondButton.ButtonBorder.TopWidth = 1;
            this.VerticalScrollbar.ScrollBarElement.SecondButton.ButtonBorder.RightColor = FXStyle.ColorForKey("ScrollBarButtonRightBottomBorderColor");
            this.VerticalScrollbar.ScrollBarElement.SecondButton.ButtonBorder.RightShadowColor = FXStyle.ColorForKey("ScrollBarButtonRightBottomBorderColor");
            this.VerticalScrollbar.ScrollBarElement.SecondButton.ButtonBorder.RightWidth = 1;
            this.VerticalScrollbar.ScrollBarElement.SecondButton.ButtonBorder.BottomColor = Color.Red;
            this.VerticalScrollbar.ScrollBarElement.SecondButton.ButtonBorder.BottomShadowColor = Color.Red;
            this.VerticalScrollbar.ScrollBarElement.SecondButton.ButtonBorder.BottomWidth = 1;

            this.VerticalScrollbar.ScrollBarElement.ThumbElement.GripImage = null;
            this.VerticalScrollbar.ScrollBarElement.ThumbElement.ThumbFill.GradientStyle = GradientStyles.Solid;
            this.VerticalScrollbar.ScrollBarElement.ThumbElement.ThumbFill.BackColor = FXStyle.ColorForKey("ScrollBarThumbBackColor");
            this.VerticalScrollbar.ScrollBarElement.ThumbElement.ThumbBorder.PaintUsingParentShape = false;
            this.VerticalScrollbar.ScrollBarElement.ThumbElement.ThumbBorder.BoxStyle = BorderBoxStyle.FourBorders;
            this.VerticalScrollbar.ScrollBarElement.ThumbElement.ThumbBorder.LeftColor = FXStyle.ColorForKey("ScrollBarThumbRightBorderColor");
            this.VerticalScrollbar.ScrollBarElement.ThumbElement.ThumbBorder.LeftShadowColor = FXStyle.ColorForKey("ScrollBarThumbRightBorderColor");
            this.VerticalScrollbar.ScrollBarElement.ThumbElement.ThumbBorder.LeftWidth = 1;
            this.VerticalScrollbar.ScrollBarElement.ThumbElement.ThumbBorder.TopColor = Color.Red;
            this.VerticalScrollbar.ScrollBarElement.ThumbElement.ThumbBorder.TopShadowColor = Color.Red;
            this.VerticalScrollbar.ScrollBarElement.ThumbElement.ThumbBorder.TopWidth = 1;
            this.VerticalScrollbar.ScrollBarElement.ThumbElement.ThumbBorder.RightColor = FXStyle.ColorForKey("ScrollBarThumbLeftTopBottomBorderColor");
            this.VerticalScrollbar.ScrollBarElement.ThumbElement.ThumbBorder.RightShadowColor = FXStyle.ColorForKey("ScrollBarThumbLeftTopBottomBorderColor");
            this.VerticalScrollbar.ScrollBarElement.ThumbElement.ThumbBorder.RightWidth = 1;
            this.VerticalScrollbar.ScrollBarElement.ThumbElement.ThumbBorder.BottomColor = Color.Yellow;
            this.VerticalScrollbar.ScrollBarElement.ThumbElement.ThumbBorder.BottomShadowColor = Color.Yellow;
            this.VerticalScrollbar.ScrollBarElement.ThumbElement.ThumbBorder.BottomWidth = 1;

Please help to fix it. Thank you!

Hristo
Telerik team
 answered on 07 Dec 2015
2 answers
208 views

Hi.

I am trying to add a custom field, but can't figure out how to make it work.

I have tried your examples, but the part where i read it in and out of the appointment is the problem. 

Here is my code so far:

Imports Telerik.WinControls.UI

Public Class CustomAppointmentFactory
    Implements IAppointmentFactory
#Region "IAppointmentFactory Members"
    Public Function CreateNewAppointment() As IEvent Implements IAppointmentFactory.CreateNewAppointment
        Return New AppointmentWithEmail()
    End Function
#End Region
End Class


Imports Telerik.WinControls.UI

Public Class AppointmentWithEmail
    Inherits Appointment
    Public Sub New()
        MyBase.New()
    End Sub

    Protected Overrides Function CreateOccurrenceInstance() As [Event]
        Return New AppointmentWithEmail()
    End Function
    Private _email As String = String.Empty
    Public Property Email() As String
        Get
            Return Me._email
        End Get
        Set(ByVal value As String)
            If Me._email <> value Then
                Me._email = value
                Me.OnPropertyChanged("Email")
            End If
        End Set
    End Property
End Class



Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports Telerik.WinControls.UI.Scheduler.Dialogs
Imports Telerik.WinControls.UI

Public Class MultipleResourcesDialog
    Inherits EditAppointmentDialog
    Friend WithEvents butStartOpgave As Telerik.WinControls.UI.RadButton
    Friend WithEvents RadSeparator4 As Telerik.WinControls.UI.RadSeparator
    Friend WithEvents butPause As Telerik.WinControls.UI.RadButton
    Friend WithEvents butSlut As Telerik.WinControls.UI.RadButton
    Friend WithEvents RadSeparator5 As Telerik.WinControls.UI.RadSeparator
    Friend WithEvents butEmail As Telerik.WinControls.UI.RadButton
    Friend WithEvents butHaster As Telerik.WinControls.UI.RadButton
    Friend WithEvents RadSeparator6 As Telerik.WinControls.UI.RadSeparator
    Friend WithEvents butOrdre As Telerik.WinControls.UI.RadButton
    Friend WithEvents RadButton1 As Telerik.WinControls.UI.RadButton
    Friend WithEvents RadSeparator7 As Telerik.WinControls.UI.RadSeparator
    Friend WithEvents RadSeparator8 As Telerik.WinControls.UI.RadSeparator
    Friend WithEvents RadSeparator9 As Telerik.WinControls.UI.RadSeparator
    Friend WithEvents txtEmail As Telerik.WinControls.UI.RadTextBox
    Private listResources As Telerik.WinControls.UI.RadListControl

    'Dim appointmentElement As AppointmentElement = SchedulerUIHelper.GetSelectedAppointment(frmOpgaver2.uiRadSchedulerMain)
    'Dim appointment As Appointment = TryCast(AppointmentElement.Appointment, Appointment)


    Public Sub New()
        InitializeComponent()
    End Sub

    Protected Overrides Sub LoadSettingsFromEvent(ByVal sourceEvent As IEvent)

        MyBase.LoadSettingsFromEvent(sourceEvent)

        '--------
        Dim appointmentWithEmail As AppointmentWithEmail = TryCast(sourceEvent, AppointmentWithEmail)
        If appointmentWithEmail IsNot Nothing Then
            Me.txtEmail.Text = appointmentWithEmail.Email
        End If
        '-------------

        If sourceEvent.ResourceId IsNot Nothing Then

            For Each item As RadListDataItem In Me.listResources.Items
                If sourceEvent.ResourceIds.Contains(TryCast(item.Value, EventId)) Then
                    item.Selected = True
                Else
                    item.Selected = False
                End If
            Next

            If Me.SchedulerData.GroupType = GroupType.None AndAlso sourceEvent.ResourceIds.Count > 1 Then
                Me.listResources.SelectedIndex = 1
            End If
        End If
    End Sub

    Protected Overrides Sub LoadResources()
        MyBase.LoadResources()

        If Me.SchedulerData Is Nothing Then
            Return
        End If

        Dim resourceStorage As ISchedulerStorage(Of IResource) = Me.SchedulerData.GetResourceStorage()
        Me.listResources.Items.Clear()

        If Me.SchedulerData.GroupType = GroupType.None Then
            Dim item As New RadListDataItem("None")
            item.Value = -1
            Me.listResources.Items.Add(item)
        End If

        For Each resource As IResource In resourceStorage
            If resource.Visible Then
                Dim item As New RadListDataItem(resource.Name)
                item.Value = resource.Id
                Me.listResources.Items.Add(item)
            End If
        Next

        If Me.listResources.Items.Count > 0 Then
            Me.listResources.SelectedIndex = 0
        End If
    End Sub

    Protected Overrides Sub ApplySettingsToEvent(ByVal targetEvent As IEvent)
        MyBase.ApplySettingsToEvent(targetEvent)

        '---------
        Dim appointmentWithEmail As AppointmentWithEmail = TryCast(targetEvent, AppointmentWithEmail)
        If AppointmentWithEmail IsNot Nothing Then
            AppointmentWithEmail.Email = Me.txtEmail.Text
        End If
        MyBase.ApplySettingsToEvent(targetEvent)
        '------------------ 


        If Me.listResources.SelectedIndex >= 0 Then

            Dim selectedItem As RadListDataItem = listResources.Items(Me.listResources.SelectedIndex)

            If selectedItem.Text.Equals("None") Then
                If targetEvent.ResourceIds.Count > 0 Then
                    targetEvent.ResourceIds.Clear()
                End If
            Else
                targetEvent.ResourceIds.Clear()

                For Each item As RadListDataItem In listResources.SelectedItems
                    Dim resourceId As EventId = TryCast(item.Value, EventId)
                    If Not targetEvent.ResourceIds.Contains(resourceId) Then
                        targetEvent.ResourceIds.Add(resourceId)
                    End If
                Next
            End If
        End If
    End Sub

    Protected Overrides Function CreateNewEvent() As IEvent
        Return New AppointmentWithEmail()
    End Function

    Private Sub InitializeComponent()
        Me.listResources = New Telerik.WinControls.UI.RadListControl()
        Me.butStartOpgave = New Telerik.WinControls.UI.RadButton()
        Me.RadSeparator4 = New Telerik.WinControls.UI.RadSeparator()
        Me.butPause = New Telerik.WinControls.UI.RadButton()
        Me.butSlut = New Telerik.WinControls.UI.RadButton()
        Me.RadSeparator5 = New Telerik.WinControls.UI.RadSeparator()
        Me.butEmail = New Telerik.WinControls.UI.RadButton()
        Me.butHaster = New Telerik.WinControls.UI.RadButton()
        Me.RadSeparator6 = New Telerik.WinControls.UI.RadSeparator()
        Me.RadSeparator7 = New Telerik.WinControls.UI.RadSeparator()
        Me.butOrdre = New Telerik.WinControls.UI.RadButton()
        Me.RadButton1 = New Telerik.WinControls.UI.RadButton()
        Me.RadSeparator8 = New Telerik.WinControls.UI.RadSeparator()
        Me.RadSeparator9 = New Telerik.WinControls.UI.RadSeparator()
        Me.txtEmail = New Telerik.WinControls.UI.RadTextBox()
        CType(Me.labelSubject, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.labelLocation, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.labelBackground, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.txtSubject, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.txtLocation, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.cmbBackground, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.labelStartTime, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.labelEndTime, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.dateStart, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.timeStart, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.dateEnd, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.timeEnd, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.chkAllDay, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.labelResource, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.cmbResource, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.labelStatus, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.cmbShowTimeAs, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.textBoxDescription, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.buttonOK, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.buttonCancel, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.buttonDelete, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.buttonRecurrence, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.errorProvider, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.radSeparator1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.radSeparator2, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.radSeparator3, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.radDropDownListReminder, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.radLabelReminder, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.listResources, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.butStartOpgave, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.RadSeparator4, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.butPause, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.butSlut, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.RadSeparator5, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.butEmail, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.butHaster, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.RadSeparator6, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.RadSeparator6.SuspendLayout()
        CType(Me.RadSeparator7, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.butOrdre, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.RadButton1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.RadSeparator8, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.RadSeparator8.SuspendLayout()
        CType(Me.RadSeparator9, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.txtEmail, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'txtSubject
        '
        Me.txtSubject.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
        Me.txtSubject.ReadOnly = True
        '
        'txtLocation
        '
        Me.txtLocation.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
        '
        'cmbBackground
        '
        '
        '
        '
        Me.cmbBackground.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren
        '
        'dateStart
        '
        Me.dateStart.Text = "17-05-2011"
        Me.dateStart.Value = New Date(2011, 5, 17, 11, 22, 29, 614)
        '
        'timeStart
        '
        Me.timeStart.Text = "11:22:29"
        Me.timeStart.Value = New Date(2011, 5, 17, 11, 22, 29, 614)
        '
        'dateEnd
        '
        Me.dateEnd.Text = "17-05-2011"
        Me.dateEnd.Value = New Date(2011, 5, 17, 11, 22, 29, 614)
        '
        'timeEnd
        '
        Me.timeEnd.Text = "11:22:29"
        Me.timeEnd.Value = New Date(2011, 5, 17, 11, 22, 29, 614)
        '
        'cmbResource
        '
        Me.cmbResource.Location = New System.Drawing.Point(853, 103)
        Me.cmbResource.Visible = False
        '
        'cmbShowTimeAs
        '
        Me.cmbShowTimeAs.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
        '
        '
        '
        Me.cmbShowTimeAs.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren
        '
        'textBoxDescription
        '
        Me.textBoxDescription.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
        Me.textBoxDescription.Location = New System.Drawing.Point(7, 322)
        Me.textBoxDescription.Size = New System.Drawing.Size(525, 116)
        '
        'buttonOK
        '
        Me.buttonOK.Location = New System.Drawing.Point(6, 444)
        '
        'buttonCancel
        '
        Me.buttonCancel.Location = New System.Drawing.Point(87, 444)
        Me.buttonCancel.Text = "Fortryd"
        '
        'buttonDelete
        '
        Me.buttonDelete.Location = New System.Drawing.Point(168, 444)
        Me.buttonDelete.Text = "Slet"
        '
        'buttonRecurrence
        '
        Me.buttonRecurrence.Location = New System.Drawing.Point(249, 444)
        Me.buttonRecurrence.Text = "Gentagelse"
        '
        'radSeparator3
        '
        Me.radSeparator3.Location = New System.Drawing.Point(6, 306)
        '
        'radDropDownListReminder
        '
        Me.radDropDownListReminder.Location = New System.Drawing.Point(856, 103)
        Me.radDropDownListReminder.Text = "None"
        '
        'radLabelReminder
        '
        Me.radLabelReminder.Location = New System.Drawing.Point(773, 105)
        Me.radLabelReminder.Size = New System.Drawing.Size(54, 18)
        Me.radLabelReminder.Text = "Reminder"
        Me.radLabelReminder.Visible = False
        '
        'listResources
        '
        Me.listResources.Location = New System.Drawing.Point(79, 169)
        Me.listResources.Name = "listResources"
        Me.listResources.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple
        Me.listResources.Size = New System.Drawing.Size(180, 131)
        Me.listResources.TabIndex = 25
        Me.listResources.Text = "radListControl1"
        '
        'butStartOpgave
        '
        Me.butStartOpgave.Location = New System.Drawing.Point(559, 9)
        Me.butStartOpgave.Name = "butStartOpgave"
        Me.butStartOpgave.Size = New System.Drawing.Size(110, 24)
        Me.butStartOpgave.TabIndex = 26
        Me.butStartOpgave.Text = "Start opgave"
        '
        'RadSeparator4
        '
        Me.RadSeparator4.Location = New System.Drawing.Point(535, 9)
        Me.RadSeparator4.Name = "RadSeparator4"
        Me.RadSeparator4.Orientation = System.Windows.Forms.Orientation.Vertical
        Me.RadSeparator4.Size = New System.Drawing.Size(15, 429)
        Me.RadSeparator4.TabIndex = 27
        Me.RadSeparator4.Text = "RadSeparator4"
        '
        'butPause
        '
        Me.butPause.Location = New System.Drawing.Point(559, 39)
        Me.butPause.Name = "butPause"
        Me.butPause.Size = New System.Drawing.Size(110, 24)
        Me.butPause.TabIndex = 28
        Me.butPause.Text = "Pause opgave"
        '
        'butSlut
        '
        Me.butSlut.Location = New System.Drawing.Point(559, 69)
        Me.butSlut.Name = "butSlut"
        Me.butSlut.Size = New System.Drawing.Size(110, 24)
        Me.butSlut.TabIndex = 29
        Me.butSlut.Text = "Afslut opgave"
        '
        'RadSeparator5
        '
        Me.RadSeparator5.Location = New System.Drawing.Point(559, 127)
        Me.RadSeparator5.Name = "RadSeparator5"
        Me.RadSeparator5.Size = New System.Drawing.Size(105, 10)
        Me.RadSeparator5.TabIndex = 30
        Me.RadSeparator5.Text = "RadSeparator5"
        '
        'butEmail
        '
        Me.butEmail.Location = New System.Drawing.Point(559, 141)
        Me.butEmail.Name = "butEmail"
        Me.butEmail.Size = New System.Drawing.Size(110, 24)
        Me.butEmail.TabIndex = 31
        Me.butEmail.Text = "E-mail til kunde"
        '
        'butHaster
        '
        Me.butHaster.Location = New System.Drawing.Point(559, 101)
        Me.butHaster.Name = "butHaster"
        Me.butHaster.Size = New System.Drawing.Size(110, 24)
        Me.butHaster.TabIndex = 30
        Me.butHaster.Text = "Haster"
        '
        'RadSeparator6
        '
        Me.RadSeparator6.Controls.Add(Me.RadSeparator7)
        Me.RadSeparator6.Location = New System.Drawing.Point(559, 171)
        Me.RadSeparator6.Name = "RadSeparator6"
        Me.RadSeparator6.Size = New System.Drawing.Size(105, 10)
        Me.RadSeparator6.TabIndex = 32
        Me.RadSeparator6.Text = "RadSeparator6"
        '
        'RadSeparator7
        '
        Me.RadSeparator7.Location = New System.Drawing.Point(0, 46)
        Me.RadSeparator7.Name = "RadSeparator7"
        Me.RadSeparator7.Size = New System.Drawing.Size(105, 10)
        Me.RadSeparator7.TabIndex = 33
        Me.RadSeparator7.Text = "RadSeparator7"
        '
        'butOrdre
        '
        Me.butOrdre.Location = New System.Drawing.Point(559, 187)
        Me.butOrdre.Name = "butOrdre"
        Me.butOrdre.Size = New System.Drawing.Size(110, 24)
        Me.butOrdre.TabIndex = 33
        Me.butOrdre.Text = "Ã…bn ordre"
        '
        'RadButton1
        '
        Me.RadButton1.Location = New System.Drawing.Point(559, 230)
        Me.RadButton1.Name = "RadButton1"
        Me.RadButton1.Size = New System.Drawing.Size(110, 46)
        Me.RadButton1.TabIndex = 34
        Me.RadButton1.Text = "Opret opgave pÃ¥ eksisterende ordre"
        Me.RadButton1.TextWrap = True
        '
        'RadSeparator8
        '
        Me.RadSeparator8.Controls.Add(Me.RadSeparator9)
        Me.RadSeparator8.Location = New System.Drawing.Point(562, 214)
        Me.RadSeparator8.Name = "RadSeparator8"
        Me.RadSeparator8.Size = New System.Drawing.Size(105, 10)
        Me.RadSeparator8.TabIndex = 35
        Me.RadSeparator8.Text = "RadSeparator8"
        '
        'RadSeparator9
        '
        Me.RadSeparator9.Location = New System.Drawing.Point(0, 46)
        Me.RadSeparator9.Name = "RadSeparator9"
        Me.RadSeparator9.Size = New System.Drawing.Size(105, 10)
        Me.RadSeparator9.TabIndex = 33
        Me.RadSeparator9.Text = "RadSeparator9"
        '
        'txtEmail
        '
        Me.txtEmail.Location = New System.Drawing.Point(302, 230)
        Me.txtEmail.Name = "txtEmail"
        Me.txtEmail.Size = New System.Drawing.Size(230, 20)
        Me.txtEmail.TabIndex = 36
        '
        'MultipleResourcesDialog
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.ClientSize = New System.Drawing.Size(676, 472)
        Me.Controls.Add(Me.txtEmail)
        Me.Controls.Add(Me.RadSeparator8)
        Me.Controls.Add(Me.RadButton1)
        Me.Controls.Add(Me.butOrdre)
        Me.Controls.Add(Me.RadSeparator6)
        Me.Controls.Add(Me.butHaster)
        Me.Controls.Add(Me.butEmail)
        Me.Controls.Add(Me.RadSeparator5)
        Me.Controls.Add(Me.butSlut)
        Me.Controls.Add(Me.butPause)
        Me.Controls.Add(Me.RadSeparator4)
        Me.Controls.Add(Me.butStartOpgave)
        Me.Controls.Add(Me.listResources)
        Me.Name = "MultipleResourcesDialog"
        '
        '
        '
        Me.RootElement.ApplyShapeToControl = True
        Me.RootElement.MinSize = New System.Drawing.Size(539, 365)
        Me.Text = "Edit Appointment"
        Me.Controls.SetChildIndex(Me.radLabelReminder, 0)
        Me.Controls.SetChildIndex(Me.radDropDownListReminder, 0)
        Me.Controls.SetChildIndex(Me.listResources, 0)
        Me.Controls.SetChildIndex(Me.radSeparator3, 0)
        Me.Controls.SetChildIndex(Me.cmbResource, 0)
        Me.Controls.SetChildIndex(Me.labelSubject, 0)
        Me.Controls.SetChildIndex(Me.labelLocation, 0)
        Me.Controls.SetChildIndex(Me.labelBackground, 0)
        Me.Controls.SetChildIndex(Me.txtSubject, 0)
        Me.Controls.SetChildIndex(Me.txtLocation, 0)
        Me.Controls.SetChildIndex(Me.cmbBackground, 0)
        Me.Controls.SetChildIndex(Me.labelStartTime, 0)
        Me.Controls.SetChildIndex(Me.labelEndTime, 0)
        Me.Controls.SetChildIndex(Me.dateStart, 0)
        Me.Controls.SetChildIndex(Me.timeStart, 0)
        Me.Controls.SetChildIndex(Me.dateEnd, 0)
        Me.Controls.SetChildIndex(Me.timeEnd, 0)
        Me.Controls.SetChildIndex(Me.chkAllDay, 0)
        Me.Controls.SetChildIndex(Me.labelResource, 0)
        Me.Controls.SetChildIndex(Me.labelStatus, 0)
        Me.Controls.SetChildIndex(Me.cmbShowTimeAs, 0)
        Me.Controls.SetChildIndex(Me.textBoxDescription, 0)
        Me.Controls.SetChildIndex(Me.buttonOK, 0)
        Me.Controls.SetChildIndex(Me.buttonCancel, 0)
        Me.Controls.SetChildIndex(Me.buttonDelete, 0)
        Me.Controls.SetChildIndex(Me.buttonRecurrence, 0)
        Me.Controls.SetChildIndex(Me.radSeparator1, 0)
        Me.Controls.SetChildIndex(Me.radSeparator2, 0)
        Me.Controls.SetChildIndex(Me.butStartOpgave, 0)
        Me.Controls.SetChildIndex(Me.RadSeparator4, 0)
        Me.Controls.SetChildIndex(Me.butPause, 0)
        Me.Controls.SetChildIndex(Me.butSlut, 0)
        Me.Controls.SetChildIndex(Me.RadSeparator5, 0)
        Me.Controls.SetChildIndex(Me.butEmail, 0)
        Me.Controls.SetChildIndex(Me.butHaster, 0)
        Me.Controls.SetChildIndex(Me.RadSeparator6, 0)
        Me.Controls.SetChildIndex(Me.butOrdre, 0)
        Me.Controls.SetChildIndex(Me.RadButton1, 0)
        Me.Controls.SetChildIndex(Me.RadSeparator8, 0)
        Me.Controls.SetChildIndex(Me.txtEmail, 0)
        CType(Me.labelSubject, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.labelLocation, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.labelBackground, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.txtSubject, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.txtLocation, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.cmbBackground, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.labelStartTime, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.labelEndTime, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.dateStart, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.timeStart, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.dateEnd, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.timeEnd, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.chkAllDay, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.labelResource, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.cmbResource, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.labelStatus, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.cmbShowTimeAs, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.textBoxDescription, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.buttonOK, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.buttonCancel, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.buttonDelete, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.buttonRecurrence, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.errorProvider, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.radSeparator1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.radSeparator2, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.radSeparator3, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.radDropDownListReminder, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.radLabelReminder, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.listResources, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.butStartOpgave, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.RadSeparator4, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.butPause, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.butSlut, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.RadSeparator5, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.butEmail, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.butHaster, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.RadSeparator6, System.ComponentModel.ISupportInitialize).EndInit()
        Me.RadSeparator6.ResumeLayout(False)
        CType(Me.RadSeparator7, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.butOrdre, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.RadButton1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.RadSeparator8, System.ComponentModel.ISupportInitialize).EndInit()
        Me.RadSeparator8.ResumeLayout(False)
        CType(Me.RadSeparator9, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.txtEmail, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub
  
End Class




   Private Sub uiRadSchedulerMain_AppointmentEditDialogShowing(sender As Object, e As AppointmentEditDialogShowingEventArgs) Handles uiRadSchedulerMain.AppointmentEditDialogShowing
        e.AppointmentEditDialog = New MultipleResourcesDialog
   End Sub


       Loading resources
       For Each dr As DataRow In MedarbejdereTableAdapter.GetData()

            With dr
                Dim resource As New Resource()
                resource.Id = New EventId(.Item("medarbejderId"))
                resource.Name = .Item("fornavn") & " - " & .Item("medarbejderId") ' medarbejder.Fornavn
                Me.uiRadSchedulerMain.Resources.Add(resource)
            End With
        Next




Loading appointments from database, after loading resources
       
uiRadSchedulerMain.Appointments.Clear()

        For Each dr As DataRow In AppointmentTableAdapter.GetData()

            With dr

                Dim schedulerAppointment As New Appointment()

                schedulerAppointment.Summary = .Item("Summary").ToString
                schedulerAppointment.Start = .Item("Start")
                schedulerAppointment.[End] = .Item("end")
                schedulerAppointment.Location = .Item("Location")
                schedulerAppointment.Description = .Item("Description")
                schedulerAppointment.AllDay = .Item("allDay")
                schedulerAppointment.StatusId = .Item("statusId")

                schedulerAppointment.ToolTipText = .Item("Description")
                schedulerAppointment.BackgroundId = .Item("ParentID")

                Me.AppointmentMedarbejdereLinkTableAdapter.FillByEnAftale(Me.FirmaDatabaseDataSet.AppointmentMedarbejdereLink, .Item("appointmentid"))

                For Each x As DataRow In AppointmentMedarbejdereLinkTableAdapter.GetDataBy1(.Item("appointmentid"))
                    With x
                        schedulerAppointment.ResourceIds.Add(New EventId(.Item("medarbejderid")))
                    End With
                Next

                uiRadSchedulerMain.Appointments.Add(schedulerAppointment)

            End With
        Next

Peter
Top achievements
Rank 1
 answered on 07 Dec 2015
3 answers
383 views
Hello,
I want set Calendar To persian calendar, is it possible?and how solve it?
if no please add this feature in products,i and others need this feature.
thank you
Dimitar
Telerik team
 answered on 07 Dec 2015
6 answers
798 views
My application has a RadDateTimePicker at the top of most forms; often the forms require some scrolling.  When a user enters the form, the RadDateTimePicker gets focus, and then when he tries to scroll down the form, he instead will inadvertently scroll the date, then (when the month reaches 12, its highest value) the form will scroll.  The user often will not know that he accidently changed a value.

My users never want to scroll the date (they are always surprised when I point out to them that it does scroll), so I want to turn off that functionality.  My first thought was to get the event handler and set Handled to true ... but there is no such property on that event handler.  Then, even though I knew better, I tried to go down the road of removing the existing handlers ... but even Reflection balks at that.

So, is there a way for me to disable the MouseWheel event in the RadDateTimePicker?  Or do you have alternate suggestions?

Thanks!
Hristo
Telerik team
 answered on 04 Dec 2015
1 answer
421 views

Hi,

I'm formatting my RadGridView and changing its color based a cell value. It's working fine but if I scroll up or down It becomes to change all rows color.

Is it a bug, or I'm doing something wrong?

Here is my code:

 

Thank you.

Private Sub grid_RowFormatting(ByVal sender As System.Object, ByVal e As Telerik.WinControls.UI.RowFormattingEventArgs)
    e.RowElement.RowInfo.MinHeight = 24
    If e.RowElement.RowInfo.Cells("Recusa").Value = "S" Then
      e.RowElement.ForeColor = Color.DarkRed
      e.RowElement.BackColor = Color.Coral
    End If
  End Sub

Ralitsa
Telerik team
 answered on 04 Dec 2015
7 answers
2.1K+ views
I have a gridview with one text column and five decimal columns. These decimal columns are editable. So inorder to edit this, the user can directly enter values or use the up and down buttons to increase or decrease values. My requirement is to restrict user from setting negative values by pressing the down button of the decimal column. How to achieve this?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 04 Dec 2015
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?