C
Chris
I am creating a nested gridview as per the tutorial here
(http://msdn2.microsoft.com/en-us/library/aa992038(vs.80).aspx). My
gridviews work fine. I have a master gridview containing the customerid.
This value is used by a a detail gridview nested within the master. This
works well but when I hide the customerid the filter stops working. I
suspect that this code can't find the ID to do the filtering. How do get
around this as I want to hide the CustomerID. Also how efficient is this?
Does it involve a separate call to the database for each row in the parent.
Is it possible grab all the child detail data in one go and filter via a
dataview. I quite like using typed datasets and the objectdatasource but I
don't want ineffiicient code. Regards, Chris.
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewRowEventArgs) Handles
GridView1.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim o As ObjectDataSource = CType(e.Row.FindControl("objdsgetorders"),
ObjectDataSource)
o.SelectParameters(0).DefaultValue = e.Row.Cells(0).Text
End If
End Sub
(http://msdn2.microsoft.com/en-us/library/aa992038(vs.80).aspx). My
gridviews work fine. I have a master gridview containing the customerid.
This value is used by a a detail gridview nested within the master. This
works well but when I hide the customerid the filter stops working. I
suspect that this code can't find the ID to do the filtering. How do get
around this as I want to hide the CustomerID. Also how efficient is this?
Does it involve a separate call to the database for each row in the parent.
Is it possible grab all the child detail data in one go and filter via a
dataview. I quite like using typed datasets and the objectdatasource but I
don't want ineffiicient code. Regards, Chris.
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewRowEventArgs) Handles
GridView1.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim o As ObjectDataSource = CType(e.Row.FindControl("objdsgetorders"),
ObjectDataSource)
o.SelectParameters(0).DefaultValue = e.Row.Cells(0).Text
End If
End Sub