Hi carl,
Thanks for your answer. Your second suggestion did compile, but it gave me
the same result as before:
http://users.skynet.be/am044448/Uitw...DGridJobs1.png
http://users.skynet.be/am044448/Uitw...DGridJobs2.png
It's not a problem for me to expand the DataSet till I get the wanted
result, but I'm not sure if the users of my program will find it as easy as
I do.
Regards,
Frederik
"Vagabond Software" <carlfenley-X-@-X-san.rr.com> wrote in message
news:(E-Mail Removed)...
> "Frederik" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> / * 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)?
Use the DataMember property of the DataGrid.. For Example:
DGridJobs.DataMember = DbDataSet.Tables[0];
If the compiler complains about that line of code, the try this:
DGridJobs.DataMember = DbDataSet.Tables[0].TableName;
Have fun...
- carl