Datagrid ItemDataBound vs Gridview ?

G

Guest

What replaces the functionality of itemdatabound in Gridview and how do I
implement it?


Sample of code used with Datagrid:

Private Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
DataGrid1.ItemDataBound
Dim cb As CheckBox
If e.Item.ItemIndex >= 0 Then
If e.Item.Cells(5).Text = True Then
cb = CType(e.Item.Cells(0).Controls(1), CheckBox)
cb.Checked = True
End If
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top