SD.llblgen.pro.Ormsupportclasses.llblgenDataSource

Posts   
 
    
Gayane
User
Posts: 10
Joined: 14-Apr-2008
# Posted on: 14-Apr-2008 06:37:39   

Hello

How can I refresh my datasource ?

I have dropdownList which is connected with datasource, but after some time some data can be changed, so I need to refresh data in my dropdownlist. I think that I need to refresh my datasource.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 14-Apr-2008 08:29:05   

The LLBLGenProDataSource will be refreshed (data would be refetched) on the following conditions:

1- If the underlying datastore was updated through the LLBLGenProDataSource. 2- If you specify or changed the FiterToUse property of the datasource. 3- If you set the Refetch property to true and rebind to the the databound control.

myDatasource.Refetch = true;
myGrid.DataBind();
Gayane
User
Posts: 10
Joined: 14-Apr-2008
# Posted on: 14-Apr-2008 08:42:18   

I add Item like this

        VendorEntity vendor = new VendorEntity();
        vendor.Name = vendorNameTextBox.Text;
        vendor.AccountNumber = accountNumberTextBox.Text;
        vendor.Save();

and then I try to refresh data in Page_load

        vendorDS.EntityCollection.GetMulti(null); // I put this line because it could be filtered
        vendorDS.Refetch = true;
        vendorDS.DataBind();
Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 14-Apr-2008 08:50:30   

instead of:

vendorDS.DataBind();

do:

myCombo.DataBind();
Gayane
User
Posts: 10
Joined: 14-Apr-2008
# Posted on: 14-Apr-2008 08:53:50   

It works !!!!!

Thank you very much !!!!