GrapeCity.Win.MultiRow Namespace > DateTimePickerCell Class : CustomFormat Property |
<SRCategoryAttribute("Behavior")> <LocalizableAttribute(True)> <DefaultValueAttribute()> <SRDescriptionAttribute("Indicates the custom format string used to format the date and/or time displayed in the Cell.")> Public Property CustomFormat As String
Dim instance As DateTimePickerCell Dim value As String instance.CustomFormat = value value = instance.CustomFormat
[SRCategory("Behavior")] [Localizable(true)] [DefaultValue()] [SRDescription("Indicates the custom format string used to format the date and/or time displayed in the Cell.")] public string CustomFormat {get; set;}
DateTimePickerCell CreateCustomCalendarStyleAndFormat() { DateTimePickerCell dateTimePickerCell1 = new DateTimePickerCell(); dateTimePickerCell1.Value = DateTime.Now; dateTimePickerCell1.Size = new Size(120, 21); dateTimePickerCell1.CustomFormat = "yyyy/MM"; dateTimePickerCell1.Format = DateTimePickerFormat.Custom; dateTimePickerCell1.CalendarFont = new Font(Control.DefaultFont, FontStyle.Bold); dateTimePickerCell1.CalendarForeColor = Color.Red; dateTimePickerCell1.CalendarMonthBackground = Color.Blue; dateTimePickerCell1.CalendarTitleBackColor = Color.Black; dateTimePickerCell1.CalendarTitleForeColor = Color.White; dateTimePickerCell1.CalendarTrailingForeColor = Color.Yellow; dateTimePickerCell1.DropDownAlign = LeftRightAlignment.Right; return dateTimePickerCell1; }
Private Function CreateCustomCalendarStyleAndFormat() As DateTimePickerCell Dim dateTimePickerCell1 As New DateTimePickerCell() dateTimePickerCell1.Value = DateTime.Now dateTimePickerCell1.Size = New Size(120, 21) dateTimePickerCell1.CustomFormat = "yyyy/MM" dateTimePickerCell1.Format = DateTimePickerFormat.Custom dateTimePickerCell1.CalendarFont = New Font(Control.DefaultFont, FontStyle.Bold) dateTimePickerCell1.CalendarForeColor = Color.Red dateTimePickerCell1.CalendarMonthBackground = Color.Blue dateTimePickerCell1.CalendarTitleBackColor = Color.Black dateTimePickerCell1.CalendarTitleForeColor = Color.White dateTimePickerCell1.CalendarTrailingForeColor = Color.Yellow dateTimePickerCell1.DropDownAlign = LeftRightAlignment.Right Return dateTimePickerCell1 End Function
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2