B
Bill
Hi
I am trying to change the Heading Name on a Datagrid from BudgID to "Budget
ID"
I am loading the data in fine but the HeaderText does not change or any of
the other properties. The program runs without errors.
Any suggestions
Thanks in advance
Bill
private void TheDataGrid()
// ---------------------------------------------------------------------------
//
{
string SQLBudget = "Select BudgID FROM Budget";
daQryBudg = new OleDbDataAdapter(SQLBudget,connMW);
daQryBudg.Fill(dsTest,"Budg");
DataTable tblQryBudget = dsTest.Tables["Budg"];
dgTest.DataSource = tblQryBudget;
DataGridTableStyle tsBudg = new DataGridTableStyle();
tsBudg.MappingName = "tblQryBudget";
cs = new DataGridTextBoxColumn();
cs.Width = 100;
cs.MappingName = "BudgID";
cs.HeaderText = "Budget ID";
ts.GridColumnStyles.Add(cs);
dgTest.TableStyles.Add(ts);
}
I am trying to change the Heading Name on a Datagrid from BudgID to "Budget
ID"
I am loading the data in fine but the HeaderText does not change or any of
the other properties. The program runs without errors.
Any suggestions
Thanks in advance
Bill
private void TheDataGrid()
// ---------------------------------------------------------------------------
//
{
string SQLBudget = "Select BudgID FROM Budget";
daQryBudg = new OleDbDataAdapter(SQLBudget,connMW);
daQryBudg.Fill(dsTest,"Budg");
DataTable tblQryBudget = dsTest.Tables["Budg"];
dgTest.DataSource = tblQryBudget;
DataGridTableStyle tsBudg = new DataGridTableStyle();
tsBudg.MappingName = "tblQryBudget";
cs = new DataGridTextBoxColumn();
cs.Width = 100;
cs.MappingName = "BudgID";
cs.HeaderText = "Budget ID";
ts.GridColumnStyles.Add(cs);
dgTest.TableStyles.Add(ts);
}