K
Kiran B.
Hi, I have managed to popluate a datagrid in multipage pageview control. My
problem is I need to use ItemDatabound Event and it's not working or should
i say, i don't know how it works with the datagrid that is associated with
pageview.
My code looks like...
Private Sub BindGrid(ByVal custMode As String, _
ByVal ds As DataSet)
Dim dview As DataView
Dim dg As DataGrid = New DataGrid()
Dim lbl As Label
dview = CreateDataSet(custMode, ds)
If Not dview Is Nothing Then
If custMode = "N" Then
'With dgdNewCustomers
' .DataSource = dview
' .DataBind()
'End With
lbl = myReturnMultiPage.FindControl("lblNew")
dg = myReturnMultiPage.FindControl("dgdMyNewOrders")
dg.DataSource = dview
dg.DataBind()
lbl.Text = "Return Orders " & dview.Count
'lblTotalNewOrders.Text = "New Orders " & dview.Count
Else
'With dgdReturnCustomers
''.DataSource = dview
'.DataBind()
'End With
lbl = myReturnMultiPage.FindControl("lblReturn")
dg = myReturnMultiPage.FindControl("dgdMyReturnOrders")
dg.DataSource = dview
dg.DataBind()
lbl.Text = "Return Orders " & dview.Count
'lblTotalReturnOrders.Text = "Return Orders " & dview.Count
End If
dview.Dispose()
End If
End Sub
Thanks
problem is I need to use ItemDatabound Event and it's not working or should
i say, i don't know how it works with the datagrid that is associated with
pageview.
My code looks like...
Private Sub BindGrid(ByVal custMode As String, _
ByVal ds As DataSet)
Dim dview As DataView
Dim dg As DataGrid = New DataGrid()
Dim lbl As Label
dview = CreateDataSet(custMode, ds)
If Not dview Is Nothing Then
If custMode = "N" Then
'With dgdNewCustomers
' .DataSource = dview
' .DataBind()
'End With
lbl = myReturnMultiPage.FindControl("lblNew")
dg = myReturnMultiPage.FindControl("dgdMyNewOrders")
dg.DataSource = dview
dg.DataBind()
lbl.Text = "Return Orders " & dview.Count
'lblTotalNewOrders.Text = "New Orders " & dview.Count
Else
'With dgdReturnCustomers
''.DataSource = dview
'.DataBind()
'End With
lbl = myReturnMultiPage.FindControl("lblReturn")
dg = myReturnMultiPage.FindControl("dgdMyReturnOrders")
dg.DataSource = dview
dg.DataBind()
lbl.Text = "Return Orders " & dview.Count
'lblTotalReturnOrders.Text = "Return Orders " & dview.Count
End If
dview.Dispose()
End If
End Sub
Thanks