Is it possible to set the height of groups (owners) individually or do all owner rows always get resized together and stay the same height?
No, you cannot set the height of any one row individually; the height of all rows is determined by the amount of vertical space available divided by the number of rows.
Is there any option to determine the row height ?
So it is possible to implement a scrollbar but it wil not be used until the user resizes the rowheight?
You could hit test for an OwnerUIElement and determine the height from its Rect property:
UIElement controlElement = this.timeLineView.UIElement;UIElement elementAtPoint = controlElement.ElementFromPoint( e.Location );nsTimeline.OwnerUIElement ownerElement = elementAtPoint != null ? elementAtPoint.GetAncestor( typeof(nsTimeline.OwnerUIElement) ) as nsTimeline.OwnerUIElement : null;
if ( ownerElement != null ){ Rectangle rect = ownerElement.Rect;}
Hi,
MarcelDumi said:I'm not getting the current Owner name when I'm clicking on Ultratimelineviewer
Hi Stolz,
thanks for your msg. At present I don't have code with me.
Thanks
Can you send me the code sample showing a custom appointment dialog? I can't find the "previous post"...
Hi All,
Please find the answer to my above query. It might be useful to others
Answer)Use ActiveOwner property of ultraTimelineView1, which allows you to set or get current active owner. When you get active owner you could access its key, name and etc.
Question) How to get current appointment details(like subject,location........). when we double click on the appointment.I need to assign the values to appointment form(frmappointment) . How can i get appointment details when i double click on appointment of ultratimlineview ??. In this I'm inserting and calling from the database the appointment details.
Answer) In other to get appointment when you click on it, you should handle ultraTimelineView1_MouseClick event and put there following code lines :
UIElement el = ultraTimelineView1.UIElement.ElementFromPoint(e.Location);
if (el.Parent.Parent != null && el.Parent.Parent is Infragistics.Win.UltraWinSchedule.TimelineView.AppointmentUIElement)
{
Appointment app = ((AppointmentUIElement)el.Parent.Parent).Appointment;
}
Thank you All,
Kind Regards
Sohail
I'm using ultratimelineviewer control when we double click on its open appointment form instead of that I have created one new form named as frmappointment. I set the autoappointmentdialog property of ultratimelineviewer is false. I have written the code in
DoubleClick event of ultraTimelineView like this
private void ultraTimelineView1_DoubleClick(object sender, EventArgs e)
frmAppointment AppointmentObj = new frmAppointment();
AppointmentObj.cmb_StartTime.Text = ultraTimelineView1.SelectedDateTimeRange.StartDateTime.ToShortTimeString();
AppointmentObj.cmb_EndTime.Text = ultraTimelineView1.SelectedDateTimeRange.EndDateTime.ToShortTimeString();
AppointmentObj.DateTime_StartDate.DateTime = ultraTimelineView1.SelectedDateTimeRange.StartDateTime.Date;
AppointmentObj.DateTime_EndDate.DateTime = ultraTimelineView1.SelectedDateTimeRange.EndDateTime.Date;
AppointmentObj.FormClosing += new FormClosingEventHandler(AppointmentObj_FormClosing);
AppointmentObj.Show();
Here iam opening my own form instead of appointment form.
I have written two methods for binding appointment like this
private DataSet GetSampleData()
DataSet theDataSet = new DataSet();
// Create Appointments DataTable
DataTable theAppointments = theDataSet.Tables.Add("Appointments");
theAppointments.Columns.Add("AppointmentID", typeof(int));
theAppointments.Columns.Add("StartDate", typeof(DateTime));
theAppointments.Columns.Add("EndDate", typeof(DateTime));
theAppointments.Columns.Add("StartTime", typeof(string));
theAppointments.Columns.Add("EndTime", typeof(string));
theAppointments.Columns.Add("Subject", typeof(string));
theAppointments.Columns.Add("OwnerKey", typeof(string));
theAppointments.Columns.Add("Location", typeof(string));
//// Add Appointments Sample Data
//theAppointments.Rows.Add(new object[] { "1", "1/18/2011 9:00:00 AM", "1/18/2011 10:00:00 AM", "Sprint Review", "Charlie" });
//theAppointments.Rows.Add(new object[] { "1", "1/18/2011 8:00:00 AM", "1/18/2011 08:30:00 AM", "Scrum Meet", "Jamie" });
//theAppointments.Rows.Add(new object[] { "1", "7/28/2009 9:00:00 AM", "7/28/2009 09:30:00 AM", "Status Meeting", "Lukas" });
//theAppointments.Rows.Add(new object[] { "1", "7/28/2009 8:45:00 AM", "7/28/2009 09:00:00 AM", "Feature Review", "Lopez" });
// Create Owners DataTable
DataTable theOwners = theDataSet.Tables.Add("Owners");
theOwners.Columns.Add("OwnerID", typeof(int));
theOwners.Columns.Add("Name", typeof(string));
theOwners.Columns.Add("OwnerKey", typeof(string));
//// Add Owners Sample Data
theOwners.Rows.Add(new object[] { "1", "Maria Charlie", "Charlie" });
theOwners.Rows.Add(new object[] { "2", "John Jamie", "Jamie" });
theOwners.Rows.Add(new object[] { "3", "Matthew Lukas", "Lukas" });
theOwners.Rows.Add(new object[] { "4", "Leah Lopez", "Lopez" });
return theDataSet;
DataSet ds = null;
int key = 1;
private void BindAppointment()
// Get the Sample Data required for Appointments and Owners data binding
if (ds == null)
ds = this.GetSampleData();
ds.Tables[0].Rows.Add(new object[] { key.ToString(), AppointmentObj.DateTime_StartDate.DateTime,AppointmentObj.DateTime_EndDate.DateTime,AppointmentObj.cmb_StartTime.Text,AppointmentObj.cmb_EndTime.Text, AppointmentObj.txtSubject.Text, "Charlie" });
string Qry="insert into tbl_Appointments values('"+AppointmentObj.txtSubject.Text+ "','" + AppointmentObj.txtLocation.Text+"','" + AppointmentObj.DateTime_StartDate.DateTime +"','" + AppointmentObj.DateTime_EndDate.DateTime+ "','" + AppointmentObj.cmb_StartTime.Text+ "','" + AppointmentObj.cmb_EndTime.Text +"','Charlie')";
InsertAppointment(Qry);//key.ToString()+ "','" +
//ds.Tables[1].Rows.Add(new object[] { key.ToString(), "Maria Charlie", "Charlie" });
Qry = "insert into tbl_Owner values('Maria Charlie','Charlie')";
// InsertAppointment(Qry);//'"+key.ToString()+"',
// Hide the Unassigned Owner
this.ultraCalendarInfo1.Owners.UnassignedOwner.Visible = false;
// Bind ultraCalendarInfo to Appointments Data Table
this.ultraCalendarInfo1.DataBindingsForAppointments.DataSource = ds.Tables["Appointments"];
// Bind ultraCalendarInfo to Owners Data Table
this.ultraCalendarInfo1.DataBindingsForOwners.DataSource = ds.Tables["Owners"];
// Set Appointments data binding properties to UltraCalendarInfo
this.ultraCalendarInfo1.DataBindingsForAppointments.StartDateTimeMember = "StartTime";
this.ultraCalendarInfo1.DataBindingsForAppointments.EndDateTimeMember = "EndTime";
this.ultraCalendarInfo1.DataBindingsForAppointments.SubjectMember = "Subject";
this.ultraCalendarInfo1.DataBindingsForAppointments.OwnerKeyMember = "OwnerKey";
// Set Owners data binding properties to UltraCalendarInfo
this.ultraCalendarInfo1.DataBindingsForOwners.KeyMember = "OwnerKey";
this.ultraCalendarInfo1.DataBindingsForOwners.NameMember = "Name";
// Assign CalendarInfo component to TimelineView control
this.ultraTimelineView1.CalendarInfo = this.ultraCalendarInfo1;
// Set UltraCalendarLook ViewStyle
this.ultraCalendarLook1.ViewStyle = Infragistics.Win.UltraWinSchedule.ViewStyle.Office2007;
// Assign CalendarLook component to TimeLineView control
this.ultraTimelineView1.CalendarLook = this.ultraCalendarLook1;
key++;
//InsertAppointment(ds);
Everything is fine I'M able to add appointment in ultratimelineview.if I'm having more than one owner itz giving the problem means I'm not getting current owner
in the above line I have hard code "Charlie" instead of this I need to pass current ower. How can i get the current owner???