textBox changes are reflected in datagridView, but are NOT persisted to underlying database

Posts   
 
    
yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 02-Feb-2006 12:13:19   

version 1.0.2005.1 final (self-servicing) VS2005 winforms


Hiya,

This is a continuation of an earlier thread.

I: 1) set the bindingSource of a datagrid to a llBlGen entity via the IDE. 2) create and populate an llBlGen entity collection 3) set this llBlGen entity collection as the datasource to my bindingSource 4) databind both textBox and datagridView to this bindingSource.

Now, I can change the text in the textBox and the changes are reflected in the datagridView.

Any ideas why the changes AREN'T persisted to the underlying database?

many thanks, yogi

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39930
Joined: 17-Aug-2003
# Posted on: 02-Feb-2006 12:46:58   

The field's IsChanged property has been changed? And if you enable tracing, the entity is saved / query is produced when you save the collection, or not?

Frans Bouma | Lead developer LLBLGen Pro
yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 02-Feb-2006 19:16:10   

Hiya Otis,

I ran a search for the text "IsChanged" in the llblGen generatd ,NET code, I can't find it.Which namespace should it be under?I suspect I haven't added it.

Another thing, I haven't captured any of the textBox_TextChanging events or anything.I had hoped that the underlying datasource would be updated automatically.Is this the case, or do I have to implement a unitOfWork?

Many thanks, yogi

yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 03-Feb-2006 01:07:09   

hiya, I just discovered that I can call the "SaveMulti" method on the entityColl :-) I had assumed that any text that is changed would have automatically persisted to the database.

thanks for reading,

goodnight wink

yogi

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39930
Joined: 17-Aug-2003
# Posted on: 03-Feb-2006 11:11:36   

Entity.Fields[index].IsChanged simple_smile

Frans Bouma | Lead developer LLBLGen Pro
yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 03-Feb-2006 13:10:57   

cheers Otis.

I have an additional post but I think it is best for another thread. Please close this one.

yogi