As My ASP.NET page gets refreshed every time i clicked on runat server control having autopostback property true. Now as the view state of the DataGrid i am using is true so it retains all its rows and values. But my datatable which i have declared is initialized so how can i recover my existing datatable from my Datagrid.
Ram Kinkar Pandey
Infopro Inc.
NOIDA, India

Datatable From Datagrid
LorenaHE
Why do you need the table if you have the data If you're filtering locally, you'd probably do better to filter on the database, performance wise, although this may mean extra round trips to the DB.
SHutch
That's really a decision that needs to be made on a case by case basis. Where do you see your application using the most resources, in DB round trips, or in the amount of state it stores Will you use a web farm If you're using a web farm, it's almost always better to just call the database again. Either way, the fact is that SQL Server will filter your data better than .NET will. Remember, you need to keep the FULL dataset in memory, and then filter it to get the results you want. That means you're passing more data back in the one query than you need, because some of it is not displayed, it's not needed after you apply your filter.
Fred Krusemark
I am just asking which will have better performance i think keeping it in cache will work better but at the same time it will be not be dynamic.
Thanks for your reply.