Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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"

Posted

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

Fat kids are harder to kidnap
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...