Trying to display data in a datagrid

T

Tom

Appreciate any help with this. I am a newbie.

I would like to place a datagrid on a form that would display the result set
of two tables. Let say Customer and Suppliers.

The relationship is one supplier can have multiple customers.

One table contains Supplier_Number, Supplier_Name (Supplier Table); and the
other table (Customer) contains Customer_Number, Supplier_number,
Customer_Name

I want to display the Supplier Number, Supplier_Name, Customer_Number and
Customer Name. All in one DataGrid.
If this is the correct control to use.

I know that a dataset can be filled with the query that would support what I
want to display. Such as:
select c.customer_number, c.name, s.supplier_number, s.supplier_name from
supplier s
inner join customer c on s.supplier_number = c.supplier_number
where c.supplier_number = 90030

The problem I am having is displaying this data in the grid. I followed all
the steps in the VB.net resource kit. I have relationship object that I set
the datamember property to. I do a fill. Why is this so difficult?
In PowerBuilder for instance I'll have to do is create the object go the
syntax view paste in my statement and DONE! Takes 30 seconds. Well, I have
to do a retrieve. Same as a fill.

I have spent the whole day looking for ways to do this. Any help is
appreciated. Please don't point to MSDN. I have been all over that site.
Seen a lot of code. Can't believe you have to write all that code for
something so simple. If that's the way it is then so be it. But if there is
a quick and dirty way that a newbie doesn't or wouldn't know about then I
would sure appreciate the help.

Thanks
Tom
 
A

Alex

Try to divide the thing:
is the DataSet actually filled with data?
then Problem with DataGrid
else Problem with DataAdapter or DataSet

I am confused, do you filled first DataTables? or just query the Data
Server? I suppose you filled DataTables because you mentioned a
DataRelation. Be more clear.

alex.
 
T

Tom

Sorry alex. I must be doing it wrong. What steps would you follow?
Graphically instead of syntactically. If that's possible. If try to do it in
a data form wizard I get two datagrids.

??? Confused.
Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top