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
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