ASP.Net 2.0 Master-Detail

A

A.C van Bers

Hi All,

I'm having a problem doing master-detail in ASP.Net with the automatic
databinding on GridView components..

What I would like to achieve is something like this
(simplified)
Students have more addresses
Students are identified (primary key) by First and Last name (not by id..
this is the problem)

When doing a datasource (SELECT * FROM STUDENTS) and attach a gridview,
I would like to make a second datasource: SELECT * FROM STUDENTADDRESSES
WHERE Firstname=@FN and LastName=@LN
... The first gridview fills the parameters with the SelectedValue
parameter.. This is incorrect, because it only generates one value, which is
not what I need.

I tried the GridView.DataKeyValue, but it doesn't bind because it does not
implement IContainer or something..

Does anyone have a solution for this, with at least code as possible
(preferrably none, only in ASP.Net 2.0 tags) because of code-generation I
would like to apply

Thanks,
Arnoud van Bers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,216
Latest member
topweb3twitterchannels

Latest Threads

Top