or
this
.grdChurches.ItemsSource = this.Church.GetChurchesByAlpha("A");
The grid is fine and the ItemsSource has 125 records, but I have a business object that I'm trying to bind to the currentrecord of grid which when it runs the following line of code says CurrentRecord is null.
DataRecord record = (DataRecord)grdChurches.CurrentRecord;
This worked just fine under 2008-Q3, so when is CurrentRecord populated now? I tried Records[0] but it also was null.
Thanks,
-Sid.
| ComboBoxEditorSettings comboBoxEditorSettings = new ComboBoxEditorSettings(); |
| comboBoxEditorSettings.ItemsSource = GetCountries(); |
| ((GridViewDataColumn) this.radGridViewEditors.Columns[2]).EditorSettings = comboBoxEditorSettings; |

| public SearchResultsPage(cRecordIndexObjectList[] recordIndexObjectList) |
| { |
| InitializeComponent(); |
| dt = new DataTable(); |
| General.ConvertRecordIndexObjectToTable(recordIndexObjectList, dt,null); |
| gvSearchResults.ItemsSource = dt; |
| // Hide the IsBold column |
| GridViewColumn columnBold = gvSearchResults.Columns["IsBold"]; |
| if (columnBold != null) |
| columnBold.IsVisible = false; |
| // Hide the RecordIndexObjectList object |
| GridViewColumn column = gvSearchResults.Columns["RecordIndexObjectList"]; |
| if (column != null) |
| column.IsVisible = false; |
| gvSearchResults.Visibility = Visibility.Visible; |
| lblTotal.Content = "Total Records: " + gvSearchResults.Records.Count; |
| } |
| comboBoxEditor.GotFocus += ((sender, e) => |
| { |
| PersonType personType = (PersonType)((Field)this.DataContext).Value; |
| comboBoxEditor.SelectedItem = (from PersonType item in comboBoxEditor.Items |
| where item.PersonTypeID == personType.PersonTypeID |
| select item).FirstOrDefault(); |
| }); |
| comboBoxEditor.GotFocus += ((sender, e) => |
| { |
| var person = DataContext as Person; |
| if (person != null && person.PersonType != null) |
| { |
| comboBoxEditor.SelectedItem = (from PersonType item in comboBoxEditor.Items |
| where item.PersonTypeID == person.PersonType.PersonTypeID |
| select item).FirstOrDefault(); |
| } |
| }); |