F
Frederik
Hi all,
I've been working a little with data binding in ASP.NET, but know I
have to make a console application using C#. The way of filling a
DataGrid seems a bit different. I can't see a DataBind() method for
the DataGrid object. What I have is the following code:
/ * start code snippet */
string connectionString = "...";
OleDbConnection dbConnection = new OleDbConnection(connectionString);
OleDbCommand OleCmd = new OleDbCommand("SELECT * FROM sol_history
ORDER BY Verstuurd", dbConnection);
OleDbDataAdapter DbAdapter = new OleDbDataAdapter();
DataSet DbDataSet = new DataSet();
DbAdapter.SelectCommand = OleCmd;
DbAdapter.Fill(DbDataSet);
DGridJobs.SetDataBinding(DbDataSet, "");
/ * end code snippet */
The code fills the DataGrid in a 'weird' kind of way: it seems to have
something like a parent table. Could someone tell me what I need to do
in order to fill the DataGrid in a 'normal' way (with normal I mean
without the parent table stuff)?
Your time and answers are appreciated,
Fre
I've been working a little with data binding in ASP.NET, but know I
have to make a console application using C#. The way of filling a
DataGrid seems a bit different. I can't see a DataBind() method for
the DataGrid object. What I have is the following code:
/ * start code snippet */
string connectionString = "...";
OleDbConnection dbConnection = new OleDbConnection(connectionString);
OleDbCommand OleCmd = new OleDbCommand("SELECT * FROM sol_history
ORDER BY Verstuurd", dbConnection);
OleDbDataAdapter DbAdapter = new OleDbDataAdapter();
DataSet DbDataSet = new DataSet();
DbAdapter.SelectCommand = OleCmd;
DbAdapter.Fill(DbDataSet);
DGridJobs.SetDataBinding(DbDataSet, "");
/ * end code snippet */
The code fills the DataGrid in a 'weird' kind of way: it seems to have
something like a parent table. Could someone tell me what I need to do
in order to fill the DataGrid in a 'normal' way (with normal I mean
without the parent table stuff)?
Your time and answers are appreciated,
Fre