I am using the csla 2.1.4 and I created a readonly collection with paging to consume it in an asp.net 2.0 app. In an asp page that I was previously using a grid to display data using a child collection, I change the data source with the readonly collection and made the ajustments to the grid. In debug mode I see that the data is retrieved from the database and the collection is correctly returned in the
Protected Sub MessagesDataSource_SelectObject(ByVal sender As Object, ByVal e As Csla.Web.SelectObjectArgs) Handles MessagesDataSource.SelectObjecte.BusinessObject = RectisSecretaryII.Library.MessagesList.GetPage(e, businessObject.Id)
End SubThe grid does not display the data.The fields are the same. Any ideas why this is happening?
Yes. I checked the field names and are the same. I also check the autogenerate field to true. It still does not work.
I have no ideas, sorry...
Try creating a new page, add a data control pointing to this list and binding it to a new grid - see what happens. If that works (which it should, binding to read-only collections works fine in general and people do it all the time), you can compare the aspx tags to the non-working page and maybe find the difference.
One more thought though. Odds are that some exception is occurring while data binding is trying to read the data from your object. It could be a null ref thing, or one of your property get blocks has an issue, or a type mismatch or ...
But I bet that's what is happening.
Copyright (c) Marimer LLC