Refresh typedList in unit of work

Posts   
 
    
Dominique
User
Posts: 22
Joined: 13-Sep-2005
# Posted on: 04-Nov-2005 13:32:34   

Hello,

I'm having the following situation:

I have a relation TravelFile -> countries I'm working in a TravelFile, there is a grid that shows the related countries using a typedList. I want to add a country to the travelFile, so I'm using TravelFile.Travelfilecountries.Add(country) and I'm adding the country to my unit of work with uow.AddForSave(country, true);

Now I would like to refresh the grid that is displaying the typedlist, but this should happen without uow.Commit, because the user can add several other countries before saving everything. How can I make the typedlist refresh and view the data that will be saved later by the unit of work?

Thx, Bernaert Dominique.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 04-Nov-2005 14:41:29   

If you want to update the datagrid with the new data, then its datasource should be updated.

So the best thing I can think of is to let the TravelFile.Travelfilecountries be the datasource of the datagrid rather than the TypedList.