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.
Thanks Andrew,
above information is very helpful for me.
You can look at the feature browser for examples of that type of display. That screenshot shows a scenario where the CalendarGroups collection of the xamScheduleDataManager (or the CalendarGroupsOverride of a specific xamDayView instance) has 2 CalendarGroup instances where the Calendars collection of each contains 2 ResourceCalendars (usually initialized by setting the InitializeCalendarIds of the CalendarGroup). Each ResourceCalendar is represented as a tab item. CalendarGroups are discussed in the help here.
The caption of that tab item (the element is CalendarHeader) that is displayed contains a combination of the Resource's Name and/or the ResourceCalendar's Name. In 10.3, it only contains the ResourceCalendar's Name but in 11.1, the default header is similar to that of Outlook where it will contain the ResourceName if the calendar's OwningResource is the CurrentUser of the xamScheduleDataManager, the Name of the OwningResource if the calendar is the DefaultCalendar of its OwningResource, and otherwise is a concatenation of the OwningResource's Name and the calendar's Name. So essentially the caption that is displayed comes from the Name property of the Resource/ResourceCalendar that you are providing - i.e. from your data.
Hi Thanks for your suggestion.
Here is the screen shot i would like to achieve
i circled the desired effect i need in my application.
It is good if you provide an example.
A screenshot of what/where you are expecting to see this text would help. It sounds like you're talking about just some text that is displayed above the control. There is no such property in the controls because there is no such area in the controls. You could either put a label/textblock above the xamDayView (i.e. outside the control) or retemplate the xamDayView to have some caption.
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.