What's wrong here? This will not show any values unless you uncomment the 2 lines, or uncomment the 2 lines and add more data too get 2 lines of data.
ObservableCollection<string> FieldValue; ObservableCollection<ObservableCollection<string>> tableValues = new ObservableCollection<ObservableCollection<string>>(); xamDataGrid1.FieldLayoutSettings.AutoGenerateFields = false; xamDataGrid1.FieldLayouts.Add(BuildHeader("FirstName", "LastName", "Age")); FieldValue = new ObservableCollection<string> { "John", "Doe", "19" }; tableValues.Add(FieldValue);
//FieldValue = new ObservableCollection<string>(); //tableValues.Add(FieldValue);
private FieldLayout BuildHeader(params string[] headers) { FieldLayout fldLayout = new FieldLayout(); for (int i = 0; i < headers.Count(); i++) { string s = headers[i]; UnboundField uf = new UnboundField(); uf.Name = s; uf.Label = s; uf.BindingPath = new PropertyPath("Items[" + i.ToString() + "]", null); fldLayout.Fields.Add(uf); } return fldLayout; }
xamDataGrid1.DataSource = tableValues;
Hello,
I have further investigated the issue that you have described and I have contacted our development team for mode detailed information on the matter. I will update you as soon as I have feedback from them.
Thank you for your patience.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thanks for the update