Walaa wrote:
I'm surprised the perform work is called in Inserts, cause the event is not defined in the aspx datasource declaration code:
<llblgenpro:LLBLGenProDataSource runat="server" ID="LLBLGenProDataSource_Answers" LivePersistence="false"
DataContainerType="EntityCollection"
EntityCollectionTypeName="VSurvey.DAL.CollectionClasses.AnswerCollection, VSurvey.DAL">
</llblgenpro:LLBLGenProDataSource>
Also I guess you don't need to do any coding in the case of updates, coz the collection should be updated automatically. (no need for remove and insert).
what i am experiencing is that updates are working only for entities that have been retrieved from the datastore (IsNew = False).
the current flow of my control is:
-> Entity collection retrieved from data store.
-> Assigned to LLBLGenProDS with livepersistence = false on perform select
-> These entities can be edited in the rad grid, the update commend fired the PerformWork method and i handle the changes there.
-> new entries in the rad grid show up in the LLBLGenProDS.Entities collection as new entities (with Isnew = True, and the prikmary key ID set to 0).
-> the new entities are edited in the gird but on the Update command, the PerformWork method is not fired and i can't handle the changes.
Again i am submitting a sample of the code. (it is the second radgrid -llblgenprodatasource pair which currently is functioning as my POC test bed.)
is there something that i need to set or handle in the update process or on the insert process to allow the LLBLGenProDataSource to fire the PerformWork on update of entities with IsNew?
Attachments
Filename |
File size |
Added on |
Approval |
AnswersGrid.zip
|
3,291 |
29-Apr-2008 18:33.21 |
Approved |