G
Guest
I have a datagrid which enables paging and the data is displayed in it when
user selects an item from a drop down list.
The code for populating data into the Datagrid is contained in the
DropDownList1_SelectedIndexChanged event handler. The Datagrid can only
display 10 rows at a time. When user clicks on a new Page number, no new rows
are displayed except when a new item is selected from the dropdown list then
would the next few rows be displayed.
Paging only works if Session object is used to store and retrieve the
dataset. The following is contained in the "DataGrid1_PageIndexChanged" Event
Handler.
Datagrid1.DataSource = CType(Session("ds"), Dataset)
Datagrid1.DataMember = "DataTable"
Datagrid1.DataBind( )
___________________________________
I just want to understand the reason behind this function although the
desired result has been achieved.
Why didn't the datagrid display the next few rows of data if Session object
is not used. Isn't the dataset stored in the memory and once called for by
the Datagrid1_PageIndexChanged event handler, data would be immediately
retrieved from there ?
user selects an item from a drop down list.
The code for populating data into the Datagrid is contained in the
DropDownList1_SelectedIndexChanged event handler. The Datagrid can only
display 10 rows at a time. When user clicks on a new Page number, no new rows
are displayed except when a new item is selected from the dropdown list then
would the next few rows be displayed.
Paging only works if Session object is used to store and retrieve the
dataset. The following is contained in the "DataGrid1_PageIndexChanged" Event
Handler.
Datagrid1.DataSource = CType(Session("ds"), Dataset)
Datagrid1.DataMember = "DataTable"
Datagrid1.DataBind( )
___________________________________
I just want to understand the reason behind this function although the
desired result has been achieved.
Why didn't the datagrid display the next few rows of data if Session object
is not used. Isn't the dataset stored in the memory and once called for by
the Datagrid1_PageIndexChanged event handler, data would be immediately
retrieved from there ?