Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Binding Data to a Grid (Foreign Key information req'd)

Status
Not open for further replies.

SonOfZeus

Programmer
Mar 6, 2002
53
CA
I am working on a Bid, Bid Details data entry screen and have decisions to make on how to work with Grids/Datasets/Lookups and Templates. My table layouts are as follows:

Bid
Bid_ID, Company_ID, Bid_Date ...

Bid_Item
Bid_ID, Item_ID, Cost_Category_ID...

Item
Item_ID, Item_Name...

Item_Item_Category
Item_ID, Category_ID ...

Item_Category
Category_ID, Category_Name ...

When displaying the Bid Items, I wish to show the Name of the item and category not the ids(Foreign Keys) and am not sure if the grid should have a Select statement for it's datasource, and if it does how does this affect changes and updates, I know if the dataset is bound directly to a table it isn't an issue.

My users are currently using a system where when they tab I am working on the Bid, Bid Details data entry screen and have decisions to make on how to work with Grids/Datasets/Lookups and Templates. My table layouts are as follows:

Bid
Bid_ID, Company_ID, Bid_Date ...

Bid_Item
Bid_ID, Item_ID, Cost_Category_ID...

Item
Item_ID, Item_Name...

Item_Item_Category
Item_ID, Category_ID ...

Item_Category
Category_ID, Category_Name ...

When displaying the Bid Items, I wish to show the Name of the item, not the description and am not sure if the grid should have a Select statement for it's datasource, and if it does how does this affect changes and updates, I know if the dataset is bound directly to a table it isn't an issue.

I also have a couple quick questions on allowing users to add records, should it be text fields on the form or a second grid based on a select routine. My users are currently using a system where when they tab off the last fiend it auto adds a new record off the last field it auto adds a new record.

Has anyone encountered examples which I could gain an insight through
 
SonofZ: My first impression in reading your problem is to just follow through with the standard SQL statement using the proper joins, etc. to populate the Grid. Similarly, any Updates, Edits, etc. can be carried out with the data shown in the Grid. Not quite sure what other specifics you might want to know. Any tabbing off the datagrid would probably require Java to initiate an event.
 
Sorry Isadore,

I'm trying this on Web Forms, with an oracle background. I tried with two simple tables and it won't generate the update routine for me, thus data isn't truly bound.

 
SZ: I'm not familiar with Oracle - so can't help you there. Is the behavior Oracle specific? Could you just as well run the routine with, say, Access or SQL? If so, provide some additional code and I'll test it on this end. Sorry I can't be of more help to you -- perhaps someone can provide insight into this behavior.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top