Hi, i use an ultratimelineview and i view the appointments in a monthly view (every column is a day). If i select more days i can add appointment with the code:
UltraTimelineView1.CalendarInfo.Appointments.Add(UltraTimelineView1.SelectedDateTimeRange.StartDateTime, UltraTimelineView1.SelectedDateTimeRange.EndDateTime, nota).Owner = UltraTimelineView1.ActiveOwner
and i can see this appointment and i can change this interval with drag and drop or move etc..
now my prob, if i try to do the same with a single day i create the appointment but i dont see it in my control. I dont know if i need to change some options for see the single day appointment in this "view" or what. The appointment exist but i cannot see it. if i select an exist appointment and change it until a single day appointment i can see but if i create it by code no. I dont understand.
tks for help.
Luca
Hello Luca,
Thanks for attached code. I made small sample using your code and I try to reproduce your issue using our latest available version 12.1.20121.2038. During my test everything works properly nevertheless that I select a single day or few days, I was able to create an appointment and it is visible. Please take a look at the attached video file and let me know if you think that I miss any specific steps to reproduce your issue. Also could you please tell me what is your current version and do you have anu installed service release and which one.
Please do not hesitate to write me
Regards
Hi, tks for answer.
i do some test, and i found that when i select only one day the start time il day 00:00:00 and end time day 23:59:59, i dont know why i cannot see it, but if i try with:
UltraTimelineView1.CalendarInfo.Appointments.Add(UltraTimelineView1.SelectedDateTimeRange.StartDateTime, UltraTimelineView1.SelectedDateTimeRange.StartDateTime.AddDays(1), nota).Owner = UltraTimelineView1.ActiveOwner
i can see the appointment (only on startday).
i think that there is some wrong options cause the dimension of the appointment is 1 more day large that i can see, its not a prob, i use this workaround for do it, but now its just for understand.
other thing, i dont know if i need to open other post, i use a context menu on ultratimelineview, for insert, cancel appointments etc...
but i want use 1 when im on owns and another when im over the "days", which is the best way?
1) before open the context menu i check where is my mouse
2) check the right mouse button and open the context menu
how can check in which part of my ultratimelineview i m on?
tks
ps i see your video, its ok, my when i try on my its not work, also i can put a new ultratimeview, but i change a very lot of appearance that i dont want do this :D
edit:
insert the correct code
k, i found it:
element.ControlElement.ElementFromPoint(e.Location).GetType.FullName
Tks for help
tks for share the code, but its not work for me. I explain better. i want know the name of which part of timelineview component, for use it in many cases.
i dont wanna check only the columnsheader, but when u press the right button on the owners or on the days or on the day header or on the month header etc
how can i get the "type" (or better the name of type), the sub component, from the mouse position?
ps i use the version 12.1.20121.1001
I`m not able to reproduce your issue, so if you are able please upload small sample that reproduce this issue and I`ll be glad to research it for you. Also please inform us what is your current version.
Regarding your question about context menus, you could try the code below:
private UIElement element = null;
private void ultraTimelineView1_MouseDown(object sender, MouseEventArgs e)
{
ColumnHeaderAreaUIElement header = element.GetAncestor(typeof(ColumnHeaderAreaUIElement)) as ColumnHeaderAreaUIElement;
if (e.Button == System.Windows.Forms.MouseButtons.Right && header != null)
// Show first context menu
}
else
// Show second context menu
private void ultraTimelineView1_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e)
element = e.Element;
private void ultraTimelineView1_MouseLeaveElement(object sender, Infragistics.Win.UIElementEventArgs e)
element =null;
Please let me know if you have any questions.