T
Tony WONG
in design mode, the following vb code is always used to have a running
number in gridview table.
<%# Container.DataItemIndex + 1 %>
Now i need to create gridview at RUNTIME
i try to make use of the following code but i do not know how to put in the
vb code in the Class part
it seems it is not a label. Grateful for any idea. thanks a lot.
*****************************
Public Class CreateRunningNo
Implements ITemplate
Public Sub InstantiateIn(ByVal container As System.Web.UI.Control)
Implements System.Web.UI.ITemplate.InstantiateIn
Dim cb As New Label
cb.Text = "<%# Container.DataItemIndex + 1 %>"
container.Controls.Add(cb)
End Sub
End Class
number in gridview table.
<%# Container.DataItemIndex + 1 %>
Now i need to create gridview at RUNTIME
i try to make use of the following code but i do not know how to put in the
vb code in the Class part
it seems it is not a label. Grateful for any idea. thanks a lot.
*****************************
Public Class CreateRunningNo
Implements ITemplate
Public Sub InstantiateIn(ByVal container As System.Web.UI.Control)
Implements System.Web.UI.ITemplate.InstantiateIn
Dim cb As New Label
cb.Text = "<%# Container.DataItemIndex + 1 %>"
container.Controls.Add(cb)
End Sub
End Class