473,408 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

custom datetimepicker control becomes disabled

Hello,
I'm using a custom control called datetimeslicker which inherits from the datetimepicker contro
and it allows you to bind null values to datetimepickers, the code for this is attached

However I'm binding such a control (dtsFixedDate) to a class property Fixeddat

The binding is performed as follow

Public Sub BindDateTimeSlickerField(ByVal strBoundfield As String, ByRef MyBoundSource As Object, ByVal strBoundTo As String, ByRef MyDateControl As datetimeslicker

MyDateControl.DataBindings.Clear(

Dim MyBinding As Binding = New Binding("text", MyBoundSource, strBoundTo
MyDateControl.DataBindings.Add(MyBinding
End Su

ps myboundsource is a class and strboundto is the member of the clas

When the binding is changed I change the value of the show checkbox and checked fields depending on whethe
the bound field is null or not as shown below

Private Sub SetDateTimeSlickerCheckBox(ByVal StrSourceDate As String, ByRef MyDateTimeSlicker As Umbrae.Windows.Forms.DateTimeSlicker

If IsDBNull(StrSourceDate) Or StrSourceDate = "" The
MyDateTimeSlicker.Checked = Fals
MyDateTimeSlicker.ShowCheckBox = Tru
Els
MyDateTimeSlicker.Checked = Tru
MyDateTimeSlicker.ShowCheckBox = Tru
End I

End Su

MY PROBLEM IS THAT WHEN i UNCHECK THE CONTROL WHICH IS BOUND TO A NULL VALUE IT WILL NOT LET ME RE-CHECK IT AND ENTER ANY DATES
any idea what is going on here, any help would be greatly appreciated

the source of the control can be found on the page below

http://www.codeproject.com/cs/miscct...7Cpicker%7Cnul

David

Nov 20 '05 #1
0 1087

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jason Butera | last post by:
I know that I can read/write custom properties of an object by using the following: Setting: document.all.customProp = "this"; Getting: document.all.customProp; Is there a way I can run...
9
by: Guy | last post by:
I have extended the datetimepicker control to incorporate a ReadOnly property. I have used the new keyword to implement my own version of the value property, so that if readonly == true then it...
4
by: | last post by:
Please, help. I created my contol, ButtonX, which subclasses System.Forms.Windows.Button class. I am doing my own paiting, by overriding OnPaint and OnPaintBackground (without calling base...
0
by: Reny J Joseph Thuthikattu | last post by:
I was trying to use a Custom control in my ASP.NET web page(a datetimepicker) with the help of url http://aspnet.4guysfromrolla.com/articles/052604-1.aspx. I made it.But i want to get the value...
1
by: Rich | last post by:
Hello, I have some datefields in a dataset (ds1). I bind some textbox controls on a windows form to these date fields in ds1, but I only want to see 01/01/2004 instead of 1/1/2004 8:00:00 AM. ...
0
by: Brian Henry | last post by:
Ok I've never implemented a snap location before so I dont really know what im doing wrong here... anyways, I am making a custom slider control that takes dates as its values instead of integers......
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
12
by: Chris Shepherd | last post by:
Greetings group, I have a situation where I'd like to visibly see disabled dates on a DateTimePicker. Frequently the Min and Max dates in the picker will be set only to days apart, and so I...
6
by: =?Utf-8?B?QmVu?= | last post by:
All - I have VB2008. On the form I have a date picker and a text box. I put would like to display a date format in the form of "MM-DD-YYYY" or "MM-YYYY" I am new to vb2008, can you show me...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.