Click here to Skip to main content
15,905,612 members
Home / Discussions / C#
   

C#

 
GeneralProblem with FileLoadException Pin
adaoja21-Aug-03 9:47
adaoja21-Aug-03 9:47 
Questionwraping text in a cell of a datagrid? Pin
mikemilano21-Aug-03 9:38
mikemilano21-Aug-03 9:38 
AnswerRe: wraping text in a cell of a datagrid? Pin
Ista21-Aug-03 14:43
Ista21-Aug-03 14:43 
Questiondeploy 2 components w/ one installer? Pin
vlusardi21-Aug-03 6:25
vlusardi21-Aug-03 6:25 
GeneralVB.NET to C# converter Pin
Iftikhar Ahmad Dar21-Aug-03 5:31
Iftikhar Ahmad Dar21-Aug-03 5:31 
GeneralRe: VB.NET to C# converter Pin
Okeno Palmer21-Aug-03 7:00
Okeno Palmer21-Aug-03 7:00 
GeneralCheck Box in Datagrid with Autopostback Pin
0siris21-Aug-03 5:23
0siris21-Aug-03 5:23 
GeneralRe: Check Box in Datagrid with Autopostback Pin
Ista21-Aug-03 14:47
Ista21-Aug-03 14:47 
Generalremoting - ClientSponsor and leasetime Pin
devvvy21-Aug-03 5:03
devvvy21-Aug-03 5:03 
GeneralHello Pin
totig21-Aug-03 4:37
totig21-Aug-03 4:37 
GeneralRe: Hello Pin
Jeff Martin21-Aug-03 6:09
Jeff Martin21-Aug-03 6:09 
GeneralDataTable / DataGrid / DataView ??!?! Pin
MeisterBiber21-Aug-03 4:12
MeisterBiber21-Aug-03 4:12 
GeneralRe: DataTable / DataGrid / DataView ??!?! Pin
Ista21-Aug-03 14:49
Ista21-Aug-03 14:49 
GeneralRe: DataTable / DataGrid / DataView ??!?! Pin
MeisterBiber21-Aug-03 21:54
MeisterBiber21-Aug-03 21:54 
Generalxml file Pin
jphuphilly21-Aug-03 2:59
jphuphilly21-Aug-03 2:59 
GeneralRe: xml file Pin
Julian Bucknall [MSFT]21-Aug-03 5:11
Julian Bucknall [MSFT]21-Aug-03 5:11 
GeneralRe: xml file Pin
jphuphilly22-Aug-03 3:45
jphuphilly22-Aug-03 3:45 
GeneralRe: xml file Pin
Manster22-Aug-03 4:28
Manster22-Aug-03 4:28 
GeneralRe: xml file Pin
Julian Bucknall [MSFT]22-Aug-03 5:51
Julian Bucknall [MSFT]22-Aug-03 5:51 
GeneralRe: xml file Pin
Julian Bucknall [MSFT]22-Aug-03 10:27
Julian Bucknall [MSFT]22-Aug-03 10:27 
GeneralDataSet Relations Pin
totig21-Aug-03 1:06
totig21-Aug-03 1:06 
GeneralRe: DataSet Relations Pin
xoph21-Aug-03 1:52
xoph21-Aug-03 1:52 
I suggest you create a typed dataset with both your tables in it. When you create a typed dataset, the typed dataset class will automatically include a method to find rows by the primary key. (Make sure the primary key is defined in all your tables in your dataset!)
For example, if your table is called "Product" and has "ProductID" as primary key, the typed dataset will provide a method called FindByProductID(int value).

You can iterate throuh the rows collection of your second table, get the productid of the current row and then go to the first table and retrieve the related record by calling FindByProductID.

That is 1 way of doing it without data relations.

Of course you could also create a data relation in your dataset, and use getchilds or getparent methods in the dataset to navigate along foreign keys.

:-OChris
GeneralRe: DataSet Relations Pin
totig21-Aug-03 2:29
totig21-Aug-03 2:29 
GeneralRe: DataSet Relations Pin
xoph23-Aug-03 0:23
xoph23-Aug-03 0:23 
GeneralRe: DataSet Relations Pin
xfqiu21-Aug-03 21:35
xfqiu21-Aug-03 21:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.