or
Hi,
I would like to defined the ReadOnly Property to DateTimePicker control.
The Enabled property does not supply our needs.
I have seen different solutions for this problem in the website
but they did not answer the following criteria's:
1 The user will be able to copy the content of the control.
2 The control will not change its visual display look.
Regards,
Namma.
Imports DevComponents.DotNetBar Imports IntelliLock.Licensing Imports Ionic.Zip Imports System Imports System.Data Imports System.IO Imports System.Windows.Forms Imports Telerik.WinControls.UI Imports Telerik.WinControls.UI.Scheduler.ICalendar Imports Microsoft.VisualBasic Imports Telerik.WinControls.UI.Scheduler.Dialogs Imports System.ComponentModel Imports System.Collections.Generic Imports System.Drawing Imports System.Text Imports Telerik.WinControls Public Class Form1 'main form loader... Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Try If (IntelliLock.Licensing.EvaluationMonitor.CurrentLicense.LicenseStatus = IntelliLock.Licensing.LicenseStatus.NotChecked) Then Text = "Chariots PIM DB v1.3.3.5 X64 - Shareware Version - Licensed To: [Unregistered]" ElseIf (IntelliLock.Licensing.EvaluationMonitor.CurrentLicense.LicenseStatus = IntelliLock.Licensing.LicenseStatus.Licensed) Then Text = "Chariots PIM DB v1.3.3.5 X64" & " " & "- Full Version" & " " & "- Licensed To:" & " " & "[" & EvaluationMonitor.CurrentLicense.LicenseInformation.GetByIndex(1).ToString() & " " & EvaluationMonitor.CurrentLicense.LicenseInformation.GetByIndex(2).ToString() & "]" Else Text = "Chariots PIM DB v1.3.3.5 X64 - Shareware Version - Licensed To: [Unregistered]" End If Catch ex As Exception MessageBoxEx.ButtonsDividerVisible = False MessageBoxEx.Show("An Error Occurred Reading The License File!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try Try Me.Sheet1TableAdapter.Fill(Me.DataSet2.Sheet1) Me.AppointmentsResourcesTableAdapter.Fill(Me.SchedulerDataSet.AppointmentsResources) Me.ResourcesTableAdapter.Fill(Me.SchedulerDataSet.Resources) Me.AppointmentsTableAdapter.Fill(Me.SchedulerDataSet.Appointments) RadSchedulerReminder1.StartReminder() Me.RadCalendar1.FocusedDate = DateTime.Today Me.RadScheduler1.FocusedDate = DateTime.Today Me.RadScheduler1.ActiveView.Equals(RadCalendar1.SelectedDate) StyleManager1.ManagerStyle = eStyle.Office2007Blue Me.RadCalendar1.ThemeName = "Office2007blue" Me.RadSchedulerNavigator1.ThemeName = "Office2007blue" Me.RadScheduler1.ThemeName = "Office2007blue" Me.RadStatusStrip1.ThemeName = "Office2007blue" Me.RadSchedulerReminder1.ThemeName = "Office2007blue" Me.RadDesktopAlert1.ThemeName = "Office2007blue" Me.RadButton1.ThemeName = "Office2007blue" Me.RadButton2.ThemeName = "Office2007blue" Me.RadPanel1.ThemeName = "Office2007blue" Me.RadLabel1.ThemeName = "Office2007blue" Me.ddTimeZones.ThemeName = "Office2007blue" Me.RadLabelElement3.Text = "Office2007blue" Me.RadLabelElement1.Text = DateTime.Today InitalizeTimeZones() RibbonBar1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F" RadScheduler1.ActiveViewType = SchedulerViewType.Month TryCast(RadScheduler1.ActiveView, SchedulerMonthView).WeekCount = 4 InitalizeTimeZones() Me.RadSchedulerNavigator1.SchedulerNavigatorElement.TimeZonesDropDown.SelectedValue = New SchedulerTimeZone(TimeZone.CurrentTimeZone) Dim colors() As Color = {Color.Transparent, Color.Transparent, Color.Transparent, Color.Transparent} Dim names() As String = {"User 1", "User 2", "User 3", "User 4"} For i As Integer = 0 To names.Length - 1 Dim resource As New Telerik.WinControls.UI.Resource() resource.Id = New EventId(i) resource.Name = names(i) resource.Color = colors(i) 'resource.Image = Me.imageList1.Images(i) Me.RadScheduler1.Resources.Add(resource) Next i Me.RadScheduler1.GroupType = GroupType.Resource Me.RadScheduler1.ActiveView.ResourcesPerView = 2 Catch ex As Exception MessageBoxEx.ButtonsDividerVisible = False MessageBoxEx.Show("An Error Occurred Loading the Database(s)!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) End TrydecimalBoxColumn = New GridViewDecimalColumndecimalBoxColumn.DataType = GetType(Decimal)decimalBoxColumn.Name = "Quantity"decimalBoxColumn.FieldName = "Quantity"decimalBoxColumn.AllowSort = FalsedecimalBoxColumn.TextAlignment = ContentAlignment.MiddleRightdecimalBoxColumn.DecimalPlaces = 5decimalBoxColumn.HeaderText = "Quantity"decimalBoxColumn.HeaderTextAlignment = ContentAlignment.MiddleRightdecimalBoxColumn.MaxWidth = 100BomRadGridView.MasterTemplate.Columns.Add(decimalBoxColumn)
[Browsable(true)] [Description("Columns for grid")] [Category("Customization")] public GridViewColumnCollection GridColumns { get { return radGridView1.MasterGridViewTemplate.Columns; } set { foreach (GridViewDataColumn column in value) { radGridView.MasterGridViewTemplate.Columns.Add(column); } } }