|
-
Apr 14th, 2007, 07:16 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] Bind to monthcalander
Hi
If i have a monthcalender control on my form and i grab a recordset that includes dates, how can i get the dates to show on the month calender.
Basically, just on a mobile phone, when you have a calender and you make a reminder, it highlights that date through a bold font.
I am trying to achieve the same effect.
I tried doing the following but it wouldn't work?
Code:
MonthCalendar1.DataBindings.Add("Date", ds.Tables(0), "Dated")
Last edited by snipered; Apr 14th, 2007 at 05:41 PM.
-
Apr 14th, 2007, 07:24 AM
#2
Re: [02/03] Bind to monthcalander
Um, the MonthCalendar doesn't have a "Date" property. You're not going to be able to bind multiple dates like that. If you want to show multiple dates with a bold font then you create an array of Dates and you assign it to the BoldedDates property.
-
Apr 14th, 2007, 07:53 AM
#3
Thread Starter
Fanatic Member
Re: [02/03] Bind to monthcalander
Ok, i'm trying this, but it doesnt seem to be working.
When i pass the array to the bolded dates, it says:
property must assign to the property or use it's value
The type of my array is date and that's what is required to pass in boldeddates.
Any ideas?
Code:
Dim arrays(2) As Date
arrays(0) = "17/04/07"
arrays(1) = "18/04/07"
arrays(2) = "19/04/07"
MonthCalendar1.BoldedDates(arrays)
-
Apr 14th, 2007, 08:20 AM
#4
Re: [02/03] Bind to monthcalander
BoldedDates is a property, not a method. You assign a value to a property, you don't pass it as a parameter:
vb Code:
MonthCalendar1.BoldedDates = arrays
-
Apr 14th, 2007, 05:39 PM
#5
Thread Starter
Fanatic Member
Re: [02/03] Bind to monthcalander
Thanks for that. That worked a charm.
Rep left.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|