バージョン

ReadOnly プロパティ (UltraCalendarCombo)

コンボの編集部分が編集可能かどうかを決定します。
シンタックス
'宣言
 
Public Property ReadOnly As Boolean
public bool ReadOnly {get; set;}
使用例
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports Infragistics.Win.UltraWinSchedule.CalendarCombo

    Private Sub LockEditPortionIfNotCurrentMonth()

        '--------------------------------------------------------------------------------
        '	ReadOnly
        '	Value
        '
        '	This example makes the edit portion of the control read-only if the
        '	selected date does not fall in the current month
        '--------------------------------------------------------------------------------

        '	If the value is null, make the edit portion read-only
        If (Me.ultraCalendarCombo1.Value Is Nothing) Then
            Me.ultraCalendarCombo1.ReadOnly = True
        Else
            Try
                '	If the not in the current month, make the edit portion read-only
                Dim dateValue As DateTime = Me.ultraCalendarCombo1.Value
                If (dateValue.Month <> DateTime.Today.Month) Then
                    Me.ultraCalendarCombo1.ReadOnly = True
                Else
                    Me.ultraCalendarCombo1.ReadOnly = False
                End If
            Catch
                Me.ultraCalendarCombo1.ReadOnly = False
            End Try
        End If

    End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using Infragistics.Win.UltraWinSchedule.CalendarCombo;

		private void LockEditPortionIfNotCurrentMonth()
		{

			//--------------------------------------------------------------------------------
			//	ReadOnly
			//	Value
			//
			//	This example makes the edit portion of the control read-only if the
			//	selected date does not fall in the current month
			//--------------------------------------------------------------------------------

			//	If the value is null, make the edit portion read-only
			if ( this.ultraCalendarCombo1.Value == null )
			{
				this.ultraCalendarCombo1.ReadOnly = true;
			}
			else
			if ( this.ultraCalendarCombo1.Value is DateTime )				 
			{
				//	If the not in the current month, make the edit portion read-only
				DateTime dateValue = (DateTime)(this.ultraCalendarCombo1.Value);
				if ( dateValue.Month != DateTime.Today.Month )
					this.ultraCalendarCombo1.ReadOnly = true;
				else
					this.ultraCalendarCombo1.ReadOnly = false;
			}

		}
参照