Datagrid blank on postback.

  • Thread starter Thread starter SatishPasala
  • Start date Start date
S

SatishPasala

Hi

I tried all the things I know am out of ideas now. Can you guys help
me out with this?

I have 4 grids on a page with I load on the Page_Load event. One of
the grids has paging. When I move to different page on one of the
grids, all the other Grids loose data on on postback.

I am binding all the grids on the Page_Load event of the page the
grids are in for each postback.

Does any one have any idea what I am missing?

satish
 
I am using .NET 1.1. I am not using custom paging. I debugged through
the code.

I see the dataview is assigned to the datasource of the DataGrid and
BindData() method being called.

I dont see the data in the grid except for the headers. I also
confirmend that there is data in the dataview that is being assigned.

I am not able to pin point where the error is.

The datagrid is in a user control. If it makes any difference.

satish
 
Since you're saying the DataGrid is in a User control, you have 4 user
controls on the page, each of which has a DataGrid in it, right?

Do the datagrids share any information with one another (do any of them rely
on one or more of the others)?

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
 
All of them have different information from different sources. They
are independent grids and do not share any information. I have paging
enabled in one grid. That particular grid works fine when I page to
different pages. For the first time !IsPostBack all the grids display
data properly. They only go blank when I click on a different page on
the datagrid.

Studio 2003 has a tendency to remove the event registrations in
InitializeComponent() method. I checked this method too to make sure
the event registrations are present.

satish
 
your paging logic might be repeated?

So if you go to page 2 on AAA.aspx, then go to BBB.aspx the grid looks
for page 2 but only has page 1. happens when you use common session
variables. Try using a ViewState variable instead.

Just a guess.
 
All the girds are on one page. Paging is referenced to datagrid
paging. I am loosing data on the postback.

satish
 
Back
Top