Hi Ric,
I tried the following code on my side and it worked fine. In my code, I
dynamically added to pageviews to the MultiPage web control, and on the
first pageview, I added a TextBox and on the second pageview, I added a
DataGrid.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim pv As PageView = New PageView
MultiPage1.Controls.Add(pv)
Dim txt As TextBox = New TextBox
txt.ID = "text1"
txt.Text = "Miranda"
pv.Controls.Add(txt)
Dim DataGrid1 As DataGrid = New DataGrid
DataGrid1.DataSource = CreateDataSource()
DataGrid1.DataBind()
Dim pv2 As PageView = New PageView
MultiPage1.Controls.Add(pv2)
pv2.Controls.Add(DataGrid1)
MultiPage1.SelectedIndex = 1
End Sub
Function CreateDataSource() As ICollection
Dim dt As New DataTable
Dim dr As DataRow
dt.Columns.Add(New DataColumn("IntegerValue", GetType(Int32)))
dt.Columns.Add(New DataColumn("StringValue", GetType(String)))
dt.Columns.Add(New DataColumn("CurrencyValue", GetType(Double)))
Dim i As Integer
For i = 0 To 8
dr = dt.NewRow()
dr(0) = i
dr(1) = "Item " + i.ToString()
dr(2) = 1.23 * (i + 1)
dt.Rows.Add(dr)
Next i
Dim dv As New DataView(dt)
Return dv
End Function 'CreateDataSource
If I have misunderstood you concern, please feel free to let me know.
Best regards,
Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.