Create an ObjectDataSource+TableAdapter to expose CRUD methods,and bind to the GridView by enabling its CRUD functions。
【Reasons】
If you create a new instance of TableAdapter from time to time,I think it cannot "remember" what it used to have,So there will be confliction when rendering the page……。So you need a "consistance" TableAdapter,with a table inside。So ObjectDataSource is better。
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: TableAdapter Update GridView
Apr 11, 2012 01:19 AM|LINK
Hello liza99:)
【Solutions】
Create an ObjectDataSource+TableAdapter to expose CRUD methods,and bind to the GridView by enabling its CRUD functions。
【Reasons】
If you create a new instance of TableAdapter from time to time,I think it cannot "remember" what it used to have,So there will be confliction when rendering the page……。So you need a "consistance" TableAdapter,with a table inside。So ObjectDataSource is better。