mansyno Posted April 4, 2003 Posted April 4, 2003 hi this is somthing iv been running in few forums but so far i got no "right" reply :) hope ill find you guys here i want to be able to show fileds from 2 or more sql tables in a data grid i know i can use the datagrid capability to bind to a dataset with relations and have the datagrid disply a +sign with navigation abilities to the user and parent/child tables but what i need is to be able to show all the fileds as one long recorde/row in the datagrid and (and thats the hardpart) still maintain updating (insert, delete, update) abilities back to the source database any ideas?? if you dont have a straight answetr to this then if you could offer me a way of spliting datasets (column wise not rows) then i could atleast make more easy way with what i need thanks Quote
Moderators Robby Posted April 4, 2003 Moderators Posted April 4, 2003 This may help http://ms-help://MS.VSCC/MS.MSDNVS/cpguide/html/cpconnavigatingrelationshipbetweentwotables.htm Quote Visit...Bassic Software
mansyno Posted April 4, 2003 Author Posted April 4, 2003 well like i said i know how to use tables and realtions only problem is if you bind a dataset that contains multi tables and realtions between them then the datagrid displyis the data as parent/child (a plus sigh near the parnt record and when you click it it opens the child record/s) this is NOT!!!!! what i asked for:) i want to be able to get the fileds from both (or more) tables to show up in the datagrid on ONE row and to be able to update them so thanks for the idea but like they say "been there, done that" Quote
iebidan Posted April 5, 2003 Posted April 5, 2003 Well, for me will work better to do it in the database using a query with multiple tables like SELECT A.ID, A.NAME, B.CITY, B.STATE FROM TABLEONE A, TABLETWO B WHERE A.ID = B.ID AND A.ID = 1 AND B.CITY ='MEXICO CITY' ***** This is just an example What you get is the fields you need coming form multiple tables in a single resultset, after getting the fields you can put it in the grid Regards Quote Fat kids are harder to kidnap
mansyno Posted April 5, 2003 Author Posted April 5, 2003 yes i know that too my frined i could also use a view in the database itself but this way it is not able to update it using the ADO.NET dataadepters Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.