You can bind the Person table to the GridView.
Then you can write a little function ... (code behind of the webpage)
Public string GetSalutation (int salid) //<< this salutationid is the
PERSON's salutation id
{
return m_modelDS.Salutation.Select("SalutationID=" +
convert.ToString(salid) )[0].SalutationName;
}
something like that.
the key is that you have a member variable with all the ds info in it.
and you write a .Select to get the correct salutationid. the code above
won't work perfectly, you'll have to fudge it a bit.
then in the binder code you have
<% GetSalutation(Convert.ToInt32("SalutationID")) %>
or something like that. (going from memory right now) There is prob a Eval
in there somewhere.
That's what I do when I have this type if scenario. Basically "I need to
Present a lookup table value"
"Matt" <m.*****@lbs-ltd.comwrote in message
news:11**********************@b75g2000hsg.googlegr oups.com...
Hi,
I have an xsd which contains two tables, for the sake of this example
I'll call them Person and Salutation. Person contains personal
details, plus a key reference to the salutation table which contains
salutations i.e. Mr Ms Mrs etc.
So, I have filled the two tables in the xsd and would like to display
the results of a join on these two tables (linking the salutation key
to an actual salutation) into a datagrid (web or client doesn't
matter). I cannot write custom SQL in the DAL and feed that into the
grid, I have to use the given tables in the xsd.
So my question is, other than writing logic to iterate over the person
data and insert the correct salutation into a new dataview and pass
this to the grid, is there an alternative? Can you specify how to join
ado.net datatables - in a view for example?
Thanks in advance,
Matt