private void CategoryRowSelected(object sender, System.Windows.Controls.SelectedCellsChangedEventArgs e) { ClearForm(); if(CategoryDataGrid.SelectedItem!=null) { categoryMember = CategoryDataGrid.SelectedItem as CategoryTbl; // value assigned to the object // if (categoryMember != null) CategoryName.Text = categoryMember.CategoryName; //Exception thrown on this statement CategoryDescription.Text = categoryMember.CategoryDescription; } } and code for the textChange event of ComboBox is: private void RefreshDataGrid(object sender, System.Windows.Controls.TextChangedEventArgs e) { CategoryDataGrid.SelectedIndex = -1; //CategoryDataGrid.ItemsSource = RefreshQuery; CategoryDataGrid.ItemsSource= Admin.RefreshCategoryDataGrid(NameCombo.Text); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)