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.Tabl es[__tableSelector .CurrentTabInde x];
DataView view = new DataView(table) ;
DataRowView drv = view[SelectedItemInd ex];
DataView detailsView =
drv.CreateChild View("Customer2 Orders");
theDetailsGrid. DataSource = detailsView;
theDetailsGrid. DataBind();
}
VB.net Code:
Private Sub BindDetails()
Dim table As DataTable
table = DataSource.Tabl es(__tableSelec tor.CurrentTabI ndex)
Dim view As DataView = New DataView(table)
Dim drv As DataRowView = view(SelectedIt emIndex)
DataView detailsView =
drv.CreateChild View("Customer2 Orders")
theDetailsGrid. DataSource = detailsView
theDetailsGrid. DataBind()
End Sub