473,382 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Datagrid blank on postback.

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

Aug 8 '07 #1
6 1819
Which version of DotNet are you using?
Are you using custom paging?
If so, they're not using the same event handlers, are they?

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup

"SatishPasala" <ps***********@gmail.comwrote in message
news:11**********************@q3g2000prf.googlegro ups.com...
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

Aug 8 '07 #2
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
On Aug 8, 5:14 pm, "David Wier" <davidw...@davidwier.nospam.com>
wrote:
Which version of DotNet are you using?
Are you using custom paging?
If so, they're not using the same event handlers, are they?

David Wierhttp://aspnet101.comhttp://iWritePro.com- One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup

"SatishPasala" <psathishre...@gmail.comwrote in message

news:11**********************@q3g2000prf.googlegro ups.com...
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

Aug 8 '07 #3
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
"SatishPasala" <ps***********@gmail.comwrote in message
news:11**********************@x35g2000prf.googlegr oups.com...
>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
On Aug 8, 5:14 pm, "David Wier" <davidw...@davidwier.nospam.com>
wrote:
>Which version of DotNet are you using?
Are you using custom paging?
If so, they're not using the same event handlers, are they?

David Wierhttp://aspnet101.comhttp://iWritePro.com- One click PDF,
convert .doc/.rtf/.txt to HTML with no
bloated markup

"SatishPasala" <psathishre...@gmail.comwrote in message

news:11**********************@q3g2000prf.googlegr oups.com...
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


Aug 8 '07 #4
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

On Aug 8, 5:47 pm, "David Wier" <davidw...@davidwier.nospam.com>
wrote:
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 Wierhttp://aspnet101.comhttp://iWritePro.com- One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup

"SatishPasala" <psathishre...@gmail.comwrote in message

news:11**********************@x35g2000prf.googlegr oups.com...
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
On Aug 8, 5:14 pm, "David Wier" <davidw...@davidwier.nospam.com>
wrote:
Which version of DotNet are you using?
Are you using custom paging?
If so, they're not using the same event handlers, are they?
David Wierhttp://aspnet101.comhttp://iWritePro.com-One click PDF,
convert .doc/.rtf/.txt to HTML with no
bloated markup
"SatishPasala" <psathishre...@gmail.comwrote in message
>news:11**********************@q3g2000prf.googlegr oups.com...
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

Aug 8 '07 #5
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.

Aug 8 '07 #6
All the girds are on one page. Paging is referenced to datagrid
paging. I am loosing data on the postback.

satish

On Aug 8, 6:58 pm, tomisaro...@gmail.com wrote:
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.

Aug 9 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Stephen | last post by:
I've got a really annoying problem with a datagrid. I have an application which populates a datagrid on the onclick event of a button. The datagrid is bound to an ArrayList which holds the values. ...
2
by: Jason | last post by:
I have a datagrid inside a user control. I use the itemcreated event to manipulate column values. I then add those values up and place the total in the footer of the datagrid. I have wrapped the...
1
by: John Dalberg | last post by:
I have a datagrid plus a button to save the contents of the grid to the database. My code gets blanks in the textbox field. I am not sure why. Also I don't know why dgi.Cells.Controls &...
9
by: Manuel | last post by:
I have a Datagrid with 9 elements. The problem is that when I sort the grid by a column, it present more columns than there are. This is my code for the ItemCreated event: Private pNo As...
0
by: js | last post by:
I have a DataGrid with a command button on the first column of the DataGrid. The DataGrid is databound to a dataset with DataKeyFiled bound to "ControlNumber" field in the dataset. I am trying to...
13
by: Lyners | last post by:
I have a web page writen in ASP.NET that contains some javascript so that when a user presses a button, or edits a certain field in a datagrid, another cell in the datagrid is filled with a value....
1
by: Andy | last post by:
Hello, I am building a form that allows user to enter multiple shipping addresses. As the number of shipping address is unknown at design time and different on each user. I used datagrid and...
2
by: Kel Good | last post by:
I have a shopping cart datagrid that is filled only the first time the page is accessed, like so: If Page.IsPostBack = False Then RetrieveShoppingCart() End If The user can then change the...
6
by: coleenholley | last post by:
Hi All :-) I need to populate a table I created as a web form. Are there any links to show me how to do this? I CANNOT use a dtagrid for this, the table has to be laid out as follows: Header...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.