vb.net ItemDataBound equivalent

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In C#, I use the following to bind ItemDataBound to a DataGrid:
grid.ItemDataBound += new DataGridItemEventHandler(OnContentItemDataBound);

Does anyone know the equivalent of this in vb.net?

Thanks,


Ken
 
AddHandler grid.ItemDataBound, AddressOf OnContentItemDataBound
or you can add the handles keyword to the end of the OnContentItemDataBound
function signature, e.g.,

Private Sub OnContentItemDataBound(ByVal sender As Object, ByVal e As
DataGridItemEventArgs) Handles grid.ItemDataBound

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

Back
Top