CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Edit the list Item in BusinessBindingListBase

rated by 0 users
Answered (Not Verified) This post has 0 verified answers | 1 Reply | 1 Follower

Top 500 Contributor
15 Posts
Arjun posted on Fri, Jan 11 2013 11:39 AM

Hi,

I have an editable list, inherited from BusinessBindingListbase. I should be able to Add, edit or delete items in the list. Add, Edit or Delete is on list not on the database. When the list is changed, I have a task bar icon to save the changed list.

If a new item is added to the list, clicking on save will call Child_Insert,  On edit Child_Update and deleting an item will trigger Child_deleteSelf() methods.

I am able to do Add and Delete.

To make the changes in list I used the following:-

Add:   list.Insert(0, item)

Delete:  list.remove(item)

Now, what i want is,  How do i change the existing item on the list ?

Please let me know your suggestions.

 

Thanks,

Arjun

All Replies

Top 10 Contributor
1,770 Posts
Suggested by JonnyBee

It is as simple as setting data properties on the actual item in the list. 

When a property value is changed -  the object will become dirty - and the DataPortal_Update method will be called when you call Save on the list. 

Jonny Bekkum, Norway CslaContrib Coordinator

Page 1 of 1 (2 items) | RSS

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems