you will need to refetch the data from the database. ViewState does store
the datasource but i am not not sure whether asp.net saves the complete
datasource to ViewState or only the part pertaining to the current View.
Though you will need the ViewState for paging to work normally.
so in a normal usage
you would bind the datagrid during initial load like this
Page_load(....)
{
if(!Page.IsPostback)
{
SetGridData()'
}
}
private SetGridData()
{
// bind you grid to the datasource here
}
private void GridName_PageIndexChanged(....)
{
GridName.CurrentPageIndex = e.NewPageIndex;
SetGridData();
}
if you disable the ViewState you will need to bind the datagrid everytime on
Page_load()
--
Regards,
Hermit Dave
(
http://hdave.blogspot.com)
"Sachi" <Sa***@discussions.microsoft.com> wrote in message
news:12**********************************@microsof t.com...
Hi,
When binding a datagrid to a dataset also paging it - when ever we are
navigating from one page to another page - dataset will be refreshed from
database or will it be done with viewstate data?
My key question is whenever data is rebinded how it is been done? Is it
fetch from database or just rebind with data avilable in viewstate?
Thanks and Regards,
Sachi