Refreshing Gridview data

Posts   
 
    
Posts: 7
Joined: 08-Sep-2005
# Posted on: 13-Aug-2006 21:17:42   

I am sure there is an obvious and simple solution to this problem which I am missing. I have a page with a Gridview in a panel bound to a lblgenprodatasource control and an update/create form in another panel. The Gridview binds the data fine. However, when I insert a new row of data or update data using the form in the other panel on the page, after the postback the data in the gridview is not refreshed. I have tried calling the databind events of the gridview/datasource controls and the select event of the datasource control after inserting or updating data with not effect.

Any help will be much appreciated.

Thanks Sumeet

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 14-Aug-2006 07:59:00   

please post code snippet showing where and how you bind your dataGrid with the dataSource.

Posts: 7
Joined: 08-Sep-2005
# Posted on: 14-Aug-2006 10:55:43   

Got it sorted. I needed to disable the Gridview viewstate and set the "Refetch" flag on the datasource control to true after updating/inderting data. Should spend more time reading the manualflushed