Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Entitylist
For this app I'm using the Entitylist as a list of work dates (Mon - Fri) as opposed to 'facilities' which I've successfully used in past apps. Each column of the schedule is a different date of appointments. I allow the user to select between two modes (Day Mode - one column of appts for the selected date or Work Week Mode - one column for each day Mon to Fri).
Day Mode works as expected. I have two issue issues with Work Week Mode.
1. The dates are not always ordered from earliest date to latest date( Mon - Fro) . I am building the OLE.EntityList as an @FM array and have assured that the apt dates are in ascending order. Yet when displayed they sometimes are and sometimes are not ordered with the date that has appts at the end. Is there a property that will assure an ascending order of my columns or is it only determined on how the EntityList is built?
2. My Day Mode works as expected with one single column of appts for the selected date. But my Work Week is not populating all of the date columns where there are appts. I am defaulting to Day Mode but have a button to toggle to Work Week View. I've debugged and stepped through the program and all variables and properties look good. Is there something I'm missing with toggling between the two modes?
Thanks
Phil
Day Mode works as expected. I have two issue issues with Work Week Mode.
1. The dates are not always ordered from earliest date to latest date( Mon - Fro) . I am building the OLE.EntityList as an @FM array and have assured that the apt dates are in ascending order. Yet when displayed they sometimes are and sometimes are not ordered with the date that has appts at the end. Is there a property that will assure an ascending order of my columns or is it only determined on how the EntityList is built?
2. My Day Mode works as expected with one single column of appts for the selected date. But my Work Week is not populating all of the date columns where there are appts. I am defaulting to Day Mode but have a button to toggle to Work Week View. I've debugged and stepped through the program and all variables and properties look good. Is there something I'm missing with toggling between the two modes?
Thanks
Phil
Comments
The Schedule control does not have any concept of sorting for entities. Therefore, it places the entities in the order you added them to the EntityList property. The only way the order will be modified is if you changed the value in the EntityList property or used the RepositionItem method.
I don't know nearly enough about your Day Mode to answer your other question. Are you using two ReportTables, one for each mode, or are you dynamically changing one ReportTable to represent each mode? What exactly are you doing to achieve the Day Mode? In other words, how are you only showing one column? My first hunch is that if you are changing the EntityList property to remove all entities other than the day of interest, then you lose all appointments for those entities which have been removed as well.
It's my multi-day 'Work Week Mode that is having the issue. The user may toggle between Day Mode and Work Week Mode.I have sorted my appointments by date and by time but the OLE.EntityList is not always dsplaying in ascending date order. The dates for the week are sometimes out of order. The 'entity name' is in the form 'January 2, 2015. The date appears as the column heading.
I'm using the same schedule control for my Work Week mode with 5 dates and columns for the selected week.
Sometimes the dates are out of order but not consistently even selecting a week and then going back to it later. Also not all appts for the week are displaying. I've debugged this and can see the variables being assigned. There should be several for the week displaying but only one apt is.
You confirmed there is no sort option so my building of the Entitylist is good. I'll continue to debug. Any outside suggestions would be helpful. Your last sentence seems to be correct but not sure how to overcome at this point.
Thanks.
I've switched between the two in this issue above and get the same results. Since I always need to remove any previously displayed appts before displaying a new set is it preferred to use RemveAppts and AddAppts or just pass in all new appts with AppointmentList?
First, my apologies. I wrote ReportTable in my previous response but I meant Schedule. I know which control we are discussing but for some reason my mind wanted to write ReportTable.
Okay, so you are using only one Schedule control and allowing the user to toggle between the modes. As I understand it, you default to Day Mode and from here the user can switch to Week Mode...and then go back and forth as desired. So far correct?
How, exactly, do you switch modes? That is, do you change the EntityList property on-the-fly? Are you simply resizing the entities to give the appearance that some are hidden from view? How do you allow the user to change dates?
I have some theories on why you are missing appointments but before I elaborate I would like to see your responses to my questions.
In your case, I think only using the AppointmentList would be best and easiest.
I can select and email you an image.
That is likely the line that displays the current time. It shouldn't be arbitrary, though. It should show you the current time. You can hide it using the CurrentTimeColor property.
OnScheduleClick allows the user to click in any non appointment area of the control. But it doesn't seem to return the time of the area clicked. Is this possible?
This is possible, although a bit indirectly. Use the MapClientToTime method. You can use the value from the Point argument from the OnScheduleClick event to pass in.