I found an example of a A Master/Detail DataGrid Control in a MSDN magazine
( http://msdn.microsoft.com/msdnmag/is...8/CuttingEdge/ ). The
code is in c# so I converted it to vb.net and I am having a problem with the
view statement. What have a done wrong? Any ideas would be appreciated.
C# code:
void BindDetails()
{
DataTable table;
table = DataSource.Tables[__tableSelector.CurrentTabIndex];
DataView view = new DataView(table);
DataRowView drv = view[SelectedItemIndex];
DataView detailsView =
drv.CreateChildView("Customer2Orders");
theDetailsGrid.DataSource = detailsView;
theDetailsGrid.DataBind();
}
VB.net Code:
Private Sub BindDetails()
Dim table As DataTable
table = DataSource.Tables(__tableSelector.CurrentTabIndex)
Dim view As DataView = New DataView(table)
Dim drv As DataRowView = view(SelectedItemIndex)
DataView detailsView =
drv.CreateChildView("Customer2Orders")
theDetailsGrid.DataSource = detailsView
theDetailsGrid.DataBind()
End Sub