Save state and restore state of ASPxGrid Accross pages

J

James Wansley

I am using C# for codebehind and ASP.Net for page code. I am using a
databound ASPxGrid on a page that is databound in the codebehind. I
have a single LinkButton on this page. When I click this link button
I:
1. Send the ASPxGrid object to the Session["Grid"] variable
2. Send the the datasource to the Session["GridDataSet"] variable.
3. Redirect the user to the GridReport page

The GridReport page has a bare-bones instance of the ASPxGrid in the
page and the codebehind and a global DataSet object in the codebehind.
The purpose of this page is to attach a dataset to an ASPxGrid and
allow the grid to take the same look as the grid stored in the Session
variable.

The GridReport page:
1. Takes the Session["Grid"] variable and assigns it to the ASPxGrid
instance.
2. Takes the Session["GridDataSet"] variable and assigns it to the
global DataSet object.


The page loads OK, but the Grid control does not render any of the
rows. Is there a step that I am missing?

Any help will be appreciated,
-James
 
D

Darrin J Olson

Something that I forget sometimes is to Bind() the datasource to the grid.
I'll assign the datasource of the grid, but forget to call the Bind()
function.

-Darrin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top