Hey everyone.
I would like to know how to display data from a dataset in a datagrid with only certain columns included from the dataset. I know how to display all of the dataset into a datagrid, but I would like to leave out some fields such as recordID and such that I dont want to display to the user. Can someone help?
This is how I fill the datagrid:
dataAdapter = new OleDbDataAdapter(CommandString, conn);
ds = new DataSet();
dataAdapter.Fill(ds, "prog");
dataTable = ds.Tables["prog"];
totalRec = dataTable.Rows.Count;
//Can I Bind Only certain columns of the dataset?
dgEvents.SetDataBinding(ds, "prog");