Click here to Skip to main content
13,140,231 members (47,700 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I have table in database with some dates. I need to display these dates in MonthCalendar with bold font. I want to select needed records from database when user scrolls calendar, but there is no such event in this control. Any advices?
Posted 3-Dec-12 19:09pm
Updated 3-Dec-12 19:11pm
Programm3r 4-Dec-12 3:06am
Hi - you mentioned that there are no events that notifies you of a date being scrolled? So the MonthCalendar.DateChanged Event doesn't notify you at all? Is this the case?
Krunal Rohit 4-Dec-12 3:16am
Not gettin' your question properly...
leptosomic 4-Dec-12 18:42pm
I don't want to select all records from the table. I do GetDisplayRange at start and select dates between beginning and end of range. Indeed, why to select all records, if user can't see all of them in calendar at the moment? And what if there are too much records, how fast will it be? DateChanged doesn't fit, because it fires when user highlights dates, but user can scroll calendar without changing selected date. Assume, calendar displays september, october and november. A day selected in september, then user scrolls calendar to left, now we see august, september and october, and a day selected in september, date hasn't changed. And august haven't any bold dates, because it wasn't included in initial range, and program doesn't know, what it's time to select next portion of dates. Actually I need DisplayRangeChanged event.

May be I should use CalendarDimensions property and SelectionRange instead of GetDisplayRange.
something like this:
and then select dates from datatable where dates between dateStart and dateEnd and on DateChanged recalculate this diapason and select next portion of data if diapason was increased. Just extending bounds of diapason in both sides such way that in worst case date will change early than user will see empty part of calendar.
leptosomic 4-Dec-12 18:51pm
And excuse me for not so clear formulation of question and broken language. This is my first post in english, I need more practice :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170915.1 | Last Updated 4 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100