StrataFrame Forum

SampleWebApp - WebBindingSource

http://forum.strataframe.net/Topic11895.aspx

By Fabian R Silva, - - 10/7/2007

Hello, I testing the web stuff of Strataframe, I try with the web example (WebBindingSource) and when I edit and update a row on the gridView appears the following error:



Error de servidor en la aplicación '/Web Sample'.

--------------------------------------------------------------------------------



The business object 'Customers' could not be found on this page.

Descripción: Excepción no controlada al ejecutar la solicitud Web actual. Revise el seguimiento de la pila para obtener más información acerca del error y dónde se originó en el código.



Detalles de la excepción: System.InvalidOperationException: The business object 'Customers' could not be found on this page.



Error de código fuente:



Se ha generado una excepción no controlada durante la ejecución de la solicitud Web actual. La información sobre el origen y la ubicación de la excepción pueden identificarse utilizando la excepción del seguimiento de la pila siguiente.



Seguimiento de la pila:





[InvalidOperationException: The business object 'Customers' could not be found on this page.]

MicroFour.StrataFrame.UI.Web.BasePage.GetBusinessObject(String Name) +150

MicroFour.StrataFrame.UI.Web.WebBusinessBindingSource.GetBusinessObject() +109

MicroFour.StrataFrame.UI.Web.WebBusinessBindingSource.GetView(String viewName) +51

System.Web.UI.DataSourceControl.System.Web.UI.IDataSource.GetView(String viewName) +32

System.Web.UI.WebControls.DataBoundControl.ConnectToDataSourceView() +382

System.Web.UI.WebControls.DataBoundControl.GetData() +27

System.Web.UI.WebControls.DataBoundControl.PerformSelect() +66

System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +99

System.Web.UI.WebControls.GridView.DataBind() +24

System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +92

System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +100

System.Web.UI.Control.EnsureChildControls() +134

System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +63

System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +429

System.Web.UI.Page.FindControl(String id) +57

System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +282

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2548









--------------------------------------------------------------------------------

Información de versión: Versión de Microsoft .NET Framework:2.0.50727.832; Versión ASP.NET:2.0.50727.832




thanks!
By Fabian R Silva, - - 10/7/2007

Hello again, I see that if I change the gridview's viewstate property to true, it work, but I see that I update a row on the gridview, press save on the form (to save the bO) and the record don't change, I have to handle the event RowUpdated and set manually each row on the BO?



thanks!



- Fabian
By StrataFrame Team - 10/8/2007

Changing the viewstate property on the grid will cause it to save its data source to the viewstate (the business object), so when the grid is updated, the proper instance of the business object is not updated (the one from the viewstate, not the one from the form).  So, no, you don't have to manually handle the UpdateRow event; it is handled internally to copy the data back to the business object.  However, I am not sure why the Customers business object could not be located.  Let me test a few things here and see if I can find a solution for you.
By John Davies - 2/28/2008

Hi,

I had the exact same problem with the sample ... did you find a solution to the missing Customer Object Issue.

Regards

jd

By Trent L. Taylor - 2/28/2008

Are you running the C# or VB.NET sample?  Also, did you get the same from the forum or the install (http://forum.strataframe.net/FindPost12344.aspx) ?