Print Page | Close Window

DatePicker control item dates not getting bold.

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=12453
Printed Date: 07 October 2024 at 5:32am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: DatePicker control item dates not getting bold.
Posted By: prashant
Subject: DatePicker control item dates not getting bold.
Date Posted: 16 October 2008 at 7:22am
Hello Codejock team,

In our project we are using two data providers. Both are custom data providers.
For multischedule mode we are using one data provider and for all other modes we are using one seperate data provider.

When we select any other mode than mulischedule then we are able to Set dates having events in a bold in Date picker control.

But when we are switching to multischedule mode we can see Events in Calendar view but we can not able to set Dates in Bold.

We are using following calls:

m_CalendarController.SetBoldDaysPerIdleStep(365);
m_CalendarController.SetBoldDaysIdleStepTime_ms(1);

Kindly help on urgent basis, thanks in advance.





Replies:
Posted By: prashant
Date Posted: 21 October 2008 at 7:22am
Hi Oleg,

I can't send you the sample. Can you suggest solution on above mentioned scenario? I amusing different data provider for multischedule mode.


Posted By: prashant
Date Posted: 21 October 2008 at 8:13am
Hello Oleg,

I can't send you the whole code but surely can post the problem area.
Here it is:

We are using two seperate data providers both are Custom Data providers.

Provider1 : Day, Weeks and Month Mode
Provider2 : Multischedule mode.

Using combo box when I switch to Mutischedule mode, we are doing following steps

1) m_pCalendar = &GetCalendarCtrl();

2)   pCalendarData = m_pCalendar->GetDataProvider();

3)   //Set Grid Data Provider
    GetCalendarCtrl().SetDataProvider(GetDocument()->GetGridDataProvider(), FALSE);

4)   CXTPCalendarData * pData = pCalendarData;

    if(!pCalendarData->IsOpen())
    {
     pCalendarData->Open();
    }

5)   pSchedules = pData->GetSchedules();

6)   CXTPCalendarResource** pCalendarRes = new CXTPCalendarResource*[numColumns];//(pCalendarCtrl);
arResources.RemoveAll();

7)   pSchedules->AddNewSchedule(_T(string));

8) pCalendarRes[col] = new CXTPCalendarResource(m_pCalendar);

9)   pCalendarRes[col]->SetName(_T(string));
pCalendarRes[col]->SetDataProvider(pData, TRUE);
pCalendarRes[col]->GetSchedules()->Add(pSchedules->GetAt(col)->GetID());
arResources.Add(pCalendarRes[col]);

10)   m_pCalendar->SetResources(&arResources);


When I execute Step No 10 "m_pCalendar->SetResources(&arResources);" I can able to see multischedule view
with all the added events but Datepicker control does not display "Bold" dates for associated events.


When I Comment out Step No 10, I can see events as well as Date picker in bold but now unable to see schedules,
It simply look like Day view.

What I need to do after calling "m_pCalendar->SetResources(&arResources);" so that Date picker also show me dates in Bold?

One thing is sure CXTPCalendarController was unable to pick resource changed.

Thanks in advance.  


Posted By: prashant
Date Posted: 22 October 2008 at 5:00am
Please find file attached. uploads/20081022_045945_Grid-Code.zip - uploads/20081022_045945_Grid-Code.zip



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net