Hello,
I want to add a timezone dropdown to my existing XamDataGrid like shown below. Is there any built in way or easy workaround, maybe with a specific style in the fieldsettings?
Thanks in advance.
Hello Rene,
Thank you for contacting Infragistics. WPF provides a DateTimeOffset struct where by a field or collection can contain a list of items of type DateTimeOffset. There is no built-in field type for this other than DateTime.
Do you require a list (Combo) that contains the offsets in each cell, or the cells just set the offset for the record?
eg. A datatable with a Date field with a timezone offset.
this.data = new DataTable();
this.data.Columns.Add("Id", typeof(int));
this.data.Columns.Add("DateTime", typeof(DateTimeOffset));
this.data.Columns.Add("Description", typeof(string));
this.AddRow(0, new DateTimeOffset(2011, 12, 12, 7, 27, 0, new TimeSpan(1,0,0)), "Date/Time stamp with offset +1");
this.AddRow(1, new DateTimeOffset(2011, 12, 12, 6, 27, 0, new TimeSpan(0,0,0)), "Same Date/Time stamp but with offset 0");
Let me know if you have any questions.
Sincerely,
Michael Di FilippoAssociate Software DeveloperInfragistics, Inc.www.infragistics.com/support