2012-09-06 52 views
0

可以gridview數據源是另一個gridview和如何?可以gridview數據源是另一個gridview

'table2 is a custom datatable 

Dim myCustomGV As GridView = New GridView() 
myCustomGV.DataSource = table2 


'GridView1 is a control on the page 
GridView1.DataSource = myCustomGV 
GridView1.DataBind() 
+1

你想做什麼做什麼呢? – Massanu

+1

你想試試這個GridView1.DataSource = myCustomGV.DataSource嗎? –

+0

我認爲你需要做的:GridView1.DataSource =(DataTable)myCustomGV.DataSource; – Steve

回答