Hey Guys
Just a quick one. Is it possible to change the size of the appointment width in a Ultra Day View?
The current way it works is that when you add an appointment it fill the appointment to the available size of the View. so if you have 2 at the same time, it makes them 50% of the total width each.
I would however like to set a pixel size for appointments, so if there is only one, it does not fill the entire width.
I hope that is clear
Thanks in advance for any help
Cheers
That might be theoretically possible using the IUIElementCreationFilter interface, but you would then be messing with some of the more complicated logic. The AppointmentUIElement's geographic placement reflects its start/end time and duration, and when the times for 2 (or more) intersect, their widths are negotiated so as to be able to display them all in their appropriate TimeSlots. Doing what you are suggesting here could interfere with that, producing unpredictable results.
Ok thanks for the heads up.
Sounds like something I should not mess with then The only reason i was looking at trying as that I am making a reservation system and the bookings that span the entire day view width, just seem to me like they are more important than the ones that are shared width. It is purely cosmetic, so not to worry
If you are looking for a way to visually highlight a particular Appointment, you should know that the Appointment object exposes an Appearance property. You could set (for example) the Appointment.Appearance.BackColor property to some arbitrary color for Appointments that you want to stand out from others. I'm not sure, however, that I understand why an appointment that spans the width of the control (which by definition means that it does not intersect with any others) should be considered "more important" in the context of booking reservations. If you want to expand on that point we can try to help.
Try using a combination of DayView.EnsureColumnInView
Or DayView.CalendarInfo.Owners.SwapOwners to re-order the rooms dynamically when you scroll left/right
HI again
I am powering on with your idea about having each table as an owner and also using "unassigned" for bookings that have yet to be assigned a table. Looks like it will be the way to go, makes it easy to see what tables are booked etc
One thing that would be good is able to lock the assigned to display in the first column, even if i scroll to the right to see other tables. IS this possible?
I would then be able to see all the tables by scrolling while also remaining to see the unassigned bookings.
Does this make sense? and is it possible?
I am looking through the help, but can not seem to see a property for that, mind you i did not see the other ones that you have pointed out for me.
Cheers for the help
Using the DataRowView is good for adhoc queries IMHO... but I prefer to build a Nice custom class and store it in the Owner.Tag object on Initialization.
Eg:
Public Class TableInformation Public Property NumberOfSeats as Integer Public Property HasWaterViews as Boolean Public Property IsVIPTable as Boolean ... 'I don't know what other fields you haveEnd Class
So on Owner Initialization create a new instance of this class and populate it from your database... then Owner.Tag = InstanceOfCustomClass
It will be nicer to work with in the future.
CheersAaron
Hey Again Aaron,
Great idea. That sound like a great plan.
I will put that into place now and test it out, but i think it will be a good way to go.
I am defiantly saving off other relivent information about the reservation using the method i learnt from you previously so query the relivant tables would be easy (Dim drv As DataRowView = DirectCast(e.Appointment.BindingListObject, DataRowView))
Again, thanks for the tips and help
Well assuming you book 70 tables... it will look ALOT better than seeing 70 Appointments squeezed together on the one appointment owner side by side.
Set some properties such as "PreferredColumnWidth", "MinimumColumnWidth" and with the control automatically having the ability to scroll sideways (although this is not ideal) you will be able to see all of the tables quiet well.
What I suggest you do is to apply some filtering to the rooms/owners.
Perhaps by default, show all 70 rooms... but the first question you want to ask your "user" to enter when they are searching/filter for available tables is the "how many seats required".
If you stored the number of seats at each table in the Owner.Tag property then you could quickly filter it.
eg:
For Each own As Owner in CalendarInfo.Owners Dim seatnumbers As Integer = TryCast(own.Tag,Integer) If seatnumbers IsNot Nothing Then own.visible = seatnumbers = _UserInputAsInteger Else own.visible = true 'set your default behaviour if room/owner does not have seat number set End IfNextYour users will be able to very quickly view only those tables which are relavant...potentially, 70 tables/owners could be cut down to 10 very quickly.
Hope this helps.