We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Style attributes don''t work when MonthShowFullWeek is set to true

Thread ID:

Created:

Updated:

Platform:

Replies:

76064 Aug 21,2008 04:58 AM Aug 21,2008 01:29 PM Windows Forms 1
loading
Tags: ScheduleControl
Administrator [Syncfusion]
Asked On August 21, 2008 04:58 AM

Hi,

I have been facing a problem with the schedule control. Whenever I set the MonthShowFullWeek property of the schedule control to true, I am not able to set the style properties of any cell. The reason I am trying this is that I want to highlight the current date in the month and week views by giving the cell a border.
I am using the following code on the OnCellDrawn event:
e.Style.Borders.All = new GridBorder(GridBorderStyle.Solid, Color.Red);

This works if the MonthShowFullWeek is not set to true.
Please let me know if there is a solution or a workaround to this.

Thanks and Regards,
Vijayant Rao.


Administrator [Syncfusion]
Replied On August 21, 2008 01:29 PM

The likely problem you are seeing ios that as you change ScheduleViewTypes (or page through the calendar), the schedulegrid object get deleted and then recreated. So, it is difficult to keep an event subscribed as the grid's keep getting deleted.

So, for now, the only way to make sure your code will always be hits is to derive the ScheduleControl and override CreateScheduleGrid. There, you can create an instance of a derived grid so you can use its override to manage you special border instead of an event. Here is a minimal sample showing how you might do it.

http://www.syncfusion.com/support/user/uploads/CS_fc51f9e8.zip


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;