Dear LLBLGen:
I have an issue with using LLBLGenDataSource2 within DevX controls and persisting data. I also have an issue with a memory leak when these are wrapped in an asp updatePanel.
DevX utilizes an 'optimized' viewState, so I have cachelocation="Session" for the ds control.
Here's my test scenario: I have a user control that has a drop down list bound to an LLBLGenDataSource2. Then, on my aspx page I place one instance of that control within a DevX ASPxPageControl, and another instance outside of it. I then wrapped both of these in an updatePanel and set enableCallbacks = false for the ASPxPagecontrol.
The user control outside of the ASPxPageControl persists data. The one within does not, and creates a new session instance upon each callback ONLY WHEN using the UpdatePanel.
Am I right to say that the control tree structure is not being preserved upon callback, therefore base.UniqueId will be different?
Please note that data does not persist even when not using the UpdatePanel, and even when not within a usercontrol within a devX control. I have an aspxGridView control on an aspx page with LLBLGenDataSource2, and it does not persist data.
Sorry if I have been confusing in anyway.
Thanks for any help you can offer.
Regards,
-Ian
p.s. A closer look into the session state within a callBack:
User control outside:
this.Session.Keys[0]
"__LLBLGENPRODATASOURCEDATA_ctl00$ContentPlaceHolderMain$InvestmentVehicles1 $LLBLGenProDataSource_ASP.secure_administration_default_aspx"
(this.Session[0] as Object[])[1]
{object[19]}
[0]: null
[1]: null
[2]: {Collection of entities of type 'InvestmentVehicleEntity'. Current number of elements: 8}
[3]: 0
[4]: 0
[5]: 0
[6]: null
[7]: ""
[8]: false
[9]: null
[10]: null
[11]: null
[12]: Count = 0
[13]: ServerSide
[14]: Count = 0
[15]: null
[16]: false
[17]: false
[18]: "Investure.Ipm.DataEntities.Generic.FactoryClasses.InvestmentVehicleEntityFactory, Investure.Ipm.DataEntities.Generic"
The one within ASPxPageControl:
this.Session.Keys[1]
"__LLBLGENPRODATASOURCEDATA_ctl00$ContentPlaceHolderMain$ASPxPageControlAdmin$ ctl28$LLBLGenProDataSource_DevExpress.Web.ASPxTabControl.ASPxPageControl"
(this.Session[1] as Object[])[1]
{object[19]}
[0]: null
[1]: null
[2]: {Collection of entities of type 'EntityBase2'. Current number of elements: 0}
[3]: 0
[4]: 0
[5]: 0
[6]: null
[7]: ""
[8]: true
[9]: null
[10]: null
[11]: null
[12]: Count = 0
[13]: ServerSide
[14]: Count = 0
[15]: null
[16]: false
[17]: false
[18]: "Investure.Ipm.DataEntities.Generic.FactoryClasses.InvestmentVehicleEntityFactory, Investure.Ipm.DataEntities.Generic"
And the instance created upon callback by the one within the ASPxPageControl:
this.Session.Keys[2]
"__LLBLGENPRODATASOURCEDATA_4a1780e0-4fc9-473b-a765-745debe86829"
(this.Session[2] as Object[])[1]
{object[19]}
[0]: null
[1]: null
[2]: {Collection of entities of type 'EntityBase2'. Current number of elements: 0}
[3]: 0
[4]: 0
[5]: 0
[6]: null
[7]: ""
[8]: true
[9]: null
[10]: null
[11]: null
[12]: Count = 0
[13]: ServerSide
[14]: Count = 0
[15]: null
[16]: false
[17]: false
[18]: "Investure.Ipm.DataEntities.Generic.FactoryClasses.InvestmentVehicleEntityFactory, Investure.Ipm.DataEntities.Generic"
LLBLGenPro v 2.6 6/6/08
VS2008
DevX 8.1.6
MS SQL Server