Hi,
i had tried lots of time but i am unable to add Header Text in XamdayView.
also there is no help on internet at all.
Please help.
Previously i had posted a question but it seems infragistics guys are very busy, and unable to sort out problems of there customers.
nandlaldotsquares said:i am unable to add Header Text in XamdayView
Thanks a lot, you replied.
Here is my code used to show calendar
XamDayView optiomDayView = new XamDayView(); optiomDayView.FontSize = (double)10; optiomDayView.CalendarDisplayMode = CalendarDisplayMode.Overlay; optiomDayView.ShowCalendarCloseButton = true; optiomDayView.ShowCalendarOverlayButton = true; DataSet myDataSet = new DataSet(); myDataSet = loadDayPage(item.Id.ToString()); ListScheduleDataConnector mydataConnector = new ListScheduleDataConnector(); mydataConnector.ResourceItemsSource = CreateResources(item, i); mydataConnector.ResourceCalendarItemsSource = GetCurrentCalendar(item, i); mydataConnector.AppointmentItemsSource = CreateAppointments(myDataSet); // Create a XamScheduleDataManager object and set its DataConnector property. XamScheduleDataManager mydataManager = new XamScheduleDataManager(); mydataManager.ActivityDialogDisplaying += new EventHandler<ActivityDialogDisplayingEventArgs>(mydataManager_ActivityDialogDisplaying); mydataManager.DataConnector = mydataConnector; // Create a CalendarGroupCollection object to add CalendarGroup objects. CalendarGroupCollection mycalendarGroupCollection = mydataManager.CalendarGroups; CalendarGroup mycalendarGroup = new CalendarGroup(); mycalendarGroup.InitialCalendarIds = "[res" + i.ToString() + "[cal" + i.ToString() + "]]"; //mycalendarGroup.InitialCalendarIds = "[res" + i.ToString() + "[cal1][cal2][cal3][cal4]]"; mycalendarGroupCollection.Add(mycalendarGroup); optiomDayView.DataManager = mydataManager; optiomDayView.VisibleDates.Clear(); optiomDayView.VisibleDates.Add(Convert.ToDateTime(dtdate.SelectedDate));
and This is code for resource
private ObservableCollection<Resource> CreateResources(customCB item, int Number) { ObservableCollection<Resource> _rcCollection = new ObservableCollection<Resource>(); Resource rc = new Resource(); rc.Id = "res" + Number.ToString(); rc.Name = item.fullName; rc.IsLocked = false; rc.IsVisible = true; rc.Description = item.fullName; _rcCollection.Add(rc); return _rcCollection; }
and this is for Calendar
private ObservableCollection<ResourceCalendar> GetCurrentCalendar(customCB item, int Number) { ObservableCollection<ResourceCalendar> _rcCollection = new ObservableCollection<ResourceCalendar>(); ResourceCalendar rc = new ResourceCalendar(); rc.Id = "cal" + Number.ToString(); rc.OwningResourceId = "res" + Number.ToString(); rc.BaseColor = GetCalendarColor(Number); rc.Name = item.fullName; rc.Description = item.fullName; rc.IsVisible = true; _rcCollection.Add(rc); return _rcCollection; }
But i did not found any option to Show/Side Calander CaptionHeaderText and to set text, as we have myDayView.CaptionHeaderText = "Heading"; in our web control.