I am having some trouble with addhandler. I am trying to go from a vb.net winforms app to a DLL. We started with a form now want to make it a DLL instead of its own app. We are using the infragistics grid and document exporter. Everything worked great as its own app but now I can't get the initialize event and beginexport to work. Is anyone able to provide some help on either issue? Below is the code. I've tried several different ways. This was the last. I am only showing initialize event. There is other code but I'm chopping it down for ease of reading. Thanks in advance.
Public Class Form1
Public Class1 As New Class1
Public ds As DataTable
Public Sub button1_Click(ByVal planid As String, ByVal ssn As String, ByVal loanid As String, ByVal pathtofile As String)
Dim UltraGrid1 As New Infragistics.Win.UltraWinGrid.UltraGrid()
'this is in another file
ds = Class1.getloans(planid, ssn, loanid)
AddHandler UltraGrid1.InitializeLayout, AddressOf UltraGrid1_InitializeLayout
UltraGrid1.DataSource = ds UltraGrid1.DataBind()
End Sub
Public Sub UltraGrid1_InitializeLayout(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs)
'stuff goes in here but it never reaches it when I put a break point in
End Sub
End Class
Public Class Form1
Public Class1 As New Class1
Public ds As DataTable
Public Sub button1_Click(ByVal planid As String, ByVal ssn As String, ByVal loanid As String, ByVal pathtofile As String)
Dim UltraGrid1 As New Infragistics.Win.UltraWinGrid.UltraGrid()
'this is in another file
ds = Class1.getloans(planid, ssn, loanid)
AddHandler UltraGrid1.InitializeLayout, AddressOf UltraGrid1_InitializeLayout
UltraGrid1.DataSource = ds UltraGrid1.DataBind()
End Sub
Public Sub UltraGrid1_InitializeLayout(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs)
'stuff goes in here but it never reaches it when I put a break point in
End Sub
End Class