Calling the Gridviews databind, did not work, infact I got an error on the call, about an instance not being set.
When I initially set the LLBLGenProDataSource2.EntityFactoryTypeName in code, I am not able to chage it after that. When I select a different node from the treeview, the value never gets assigned to the EntityFactoryTypeName, the original assigned value does not get released.
I thought LLBLGenProDataSource21.EntityCollection.Clear() would clear the entity and allow me to assign a new one, but it does not appear to work that way.
What is the proper method of assigning a new entity to the LLBLGenProDataSource2, when it already had an EntityFactoryTypeName assigned? The following code, works the first time through, but never assigns the value from the treeview after that.
LLBLGenProDataSource21.AdapterTypeName = "D3000SQL_V6.DatabaseSpecific.DataAccessAdapter, D3000SQL_V6DBSpecific"
LLBLGenProDataSource21.DataContainerType = DataSourceDataContainerType.EntityCollection
debug.print Me.TreeView1.SelectedNode.Value
LLBLGenProDataSource21.EntityFactoryTypeName = Me.TreeView1.SelectedNode.Value
LLBLGenProDataSource21.DataBind()
Me.lblCode.Text = Me.TreeView1.SelectedNode.Text