By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,033 Members | 1,280 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,033 IT Pros & Developers. It's quick & easy.

Master Detail DataGrid

P: n/a
Dan
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
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Dan,

There is as well a Master Detail WebDatagrid one with VBNet

http://support.microsoft.com/default...b;en-us;308485

I hope this helps,

Cor
Nov 21 '05 #2

P: n/a
Dan
Thank you Cor. I appreciate your help. Your contribution to this thread is
invaluable to us.
Thank you,
Dan

"Cor Ligthert" wrote:
Dan,

There is as well a Master Detail WebDatagrid one with VBNet

http://support.microsoft.com/default...b;en-us;308485

I hope this helps,

Cor

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.