Cannot hide the Grid columns using Remove or RemoveAt. or using the Visible property
Below is my code.
private ObservableCollection<Patient> patientCollection = new ObservableCollection<Patient>();
int recCtr = 0;
var root = Windows.Storage.ApplicationData.Current.LocalFolder.Path;
using (var db = new SQLite.SQLiteConnection(dbPath))
{
try
{
var list = db.Table<Patient>().ToList();
foreach (var item in list)
{
recCtr++;
/// Full Patient Table fields displayed
patCollection.Add(new Patient() { FirstName = item.FirstName, LastName = item.LastName, Address1 = item.Address1, City = item.City, State = item.State, PostCode = item.PostCode, BirthDate = item.BirthDate });
}
}
catch { }
}
int colCtr = PatientGrid.Columns.Count;
PatientGrid.ItemsSource = patCollection;
PatientGrid.Columns.RemoveAt(1);