I'm trying to add a listbox to a datagridview. I've created a item template within the grid now I'm trying to find the control so I can bind the list to a sql table. I'm getting e.item is not a member of system.eventargs. what am I missing? I've also tried rowdata bound, load and row created and still keep getting the same error.
Private Sub dg_DataBound(sender As Object, e As System.EventArgs) Handles dg.DataBound
Dim list As ListBox = CType(e.item.findcontrol("list1"), ListBox)
Red Flag Submitted
Thank you for helping keep Tek-Tips Forums free from inappropriate posts. The Tek-Tips staff will check this out and take appropriate action.
Reply To This Thread
Posting in the Tek-Tips forums is a member-only feature.