473,320 Members | 2,088 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,320 software developers and data experts.

DataGrid Again

Roy
I am still having problems with a datagrid. As I said before, this is my
first attempt at an ASP.Net (or any asp) application.
I have a grid that is bound to a dataset. This grid is populated in the
Page_Load event. The grid allows paging and itr works correctly.
I have another grid that is also populated by a dataset. This dataset is
filled as the result of a stored procedure and a user defined parameter. The
dataset is filled in a button_Click event. At first, when the button was
clicked, the grid would populate and be visible. However, whne the next
event was pressed I could see the progress bar moving but the data in the
grid did not change.
After much work, including deleting the grid and building a new one, the
grid is no longer visible. I even move the fill to the page_load event and
gave the proc a parameter value. The dataset fills but, the grid is not
visible.
What I am doing should be possible, isn't it? I am trying to follow examples
in a book but, I cannot get this to work.
I will be more than happy to show as much code as would be helpful.
I cannot tell you how much your help would be appreciated.
Thanks,
Roy
Nov 18 '05 #1
2 938
This post looks strangely familiar. The dataset only makes an appearance if
there is data to be displayed. Your code should be like this:

if(DataGrid1 != null && DataGrid1.Tables[0].Rows.Count > 0)
use the data set
else
display a message informing the user that there is no data

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/2bz4t
"Roy" <rf******@monitronics.com> wrote in message
news:IT*****************@newssvr24.news.prodigy.co m...
I am still having problems with a datagrid. As I said before, this is my
first attempt at an ASP.Net (or any asp) application.
I have a grid that is bound to a dataset. This grid is populated in the
Page_Load event. The grid allows paging and itr works correctly.
I have another grid that is also populated by a dataset. This dataset is
filled as the result of a stored procedure and a user defined parameter. The dataset is filled in a button_Click event. At first, when the button was
clicked, the grid would populate and be visible. However, whne the next
event was pressed I could see the progress bar moving but the data in the
grid did not change.
After much work, including deleting the grid and building a new one, the
grid is no longer visible. I even move the fill to the page_load event and
gave the proc a parameter value. The dataset fills but, the grid is not
visible.
What I am doing should be possible, isn't it? I am trying to follow examples in a book but, I cannot get this to work.
I will be more than happy to show as much code as would be helpful.
I cannot tell you how much your help would be appreciated.
Thanks,
Roy

Nov 18 '05 #2
Roy
The dataset has 49 rows.

"Alvin Bruney" <vapor at steaming post office> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
This post looks strangely familiar. The dataset only makes an appearance if there is data to be displayed. Your code should be like this:

if(DataGrid1 != null && DataGrid1.Tables[0].Rows.Count > 0)
use the data set
else
display a message informing the user that there is no data

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/2bz4t
"Roy" <rf******@monitronics.com> wrote in message
news:IT*****************@newssvr24.news.prodigy.co m...
I am still having problems with a datagrid. As I said before, this is my
first attempt at an ASP.Net (or any asp) application.
I have a grid that is bound to a dataset. This grid is populated in the
Page_Load event. The grid allows paging and itr works correctly.
I have another grid that is also populated by a dataset. This dataset is
filled as the result of a stored procedure and a user defined parameter.

The
dataset is filled in a button_Click event. At first, when the button was
clicked, the grid would populate and be visible. However, whne the next
event was pressed I could see the progress bar moving but the data in the grid did not change.
After much work, including deleting the grid and building a new one, the
grid is no longer visible. I even move the fill to the page_load event and gave the proc a parameter value. The dataset fills but, the grid is not
visible.
What I am doing should be possible, isn't it? I am trying to follow

examples
in a book but, I cannot get this to work.
I will be more than happy to show as much code as would be helpful.
I cannot tell you how much your help would be appreciated.
Thanks,
Roy


Nov 18 '05 #3

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

Similar topics

8
by: Ashish Shridharan | last post by:
Hi All I have been trying to add a control to the header cell of a datagrid on my ASP.NET page. These controls are defined in the HTML as ASP.NET web controls. They are being added into the...
2
by: Dominic | last post by:
Hi guys, I'm not sure if this question belongs to FAQ, but I couldn't find a concrete answer. I created a Datagrid control using ItemTemplate, but it's NOT a in-place editing datagrid. One of...
4
by: Glenn Owens | last post by:
I have a DataGrid web control which I've dynamically populated with template columns to be used for bulk-editting. Generally, all of the columns are textbox and/or dropdownlist child controls. ...
2
by: Manish | last post by:
Hey folks I am having a weird problem in ASP .Net. My page is in C#. I have a datagrid, which populates based on selection in drop down box on ASP page. This datagrid has template textbox colum in...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
2
by: enak | last post by:
I can not get my datagrid to page. I have a datagrid that I can sort 2 of the columns. This works great. I added paging and when I display the dg it shows 5 pages. (I am showing page numbers at...
1
by: Andrew | last post by:
Hey all, I am very new to ASP.Net (and .Net in general), but that isn't stopping the boss from wanting to begin new projects in it. This latest project has me kinda stumped and after a couple...
4
by: Rod | last post by:
I posted a message to this group yesterday asking how to pass parameters to a web form that is the source of an IFrame on a parent web form. I've gotten my answer, and it works. Thanks! Now I...
5
by: Jeff User | last post by:
Hello ..NET 1.1, VS 2003, C# & asp.net I have tried to follow msdn instructions and samples but I can not get an event to fire for this button on the datagrid. There has to be something obvious...
10
by: amiga500 | last post by:
Hello, I have one basic simple question. When I have multiple records in the datagrid as follows: Code Product 1 Product 2 Product 3 11111 A B C...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.