Click here to Skip to main content
16,017,235 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using a data table, which is filling at the page_load event. At same page i have two button ADD and REMOVE. Whenever I pressed these button a record add or remove from table in database. At same time i want to refresh data table (at the time of pressing buttons).

One way i am thinking is that i refill the data table at buttons click event, but it effect performance of application.

Have any other way to refresh the data table, then please tell me.

Thanks.
Posted

1 solution

Use custom objects or DataReader to fetch the information. DataSet and Datatable is working on a disconnected environment. Use procedure for Add & Remove and use Data Reader or Custom object to fetch the information.

Still you need DataTable in your scenario, Just remove the record from the Data View(Have the mechanism to remove from table also at the same time) so that it will remove from UI also and it won't refill the datatable.

Thanks
Manoharan
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900