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

GridView Not Returning Data

I'm using the 2.0 framework and cannot get a gridview to return records
with an objectDataSource.
I can preview the data from the datatable.
To make this as simple as possible I used the wizard and turned all
paging and sorting options off and the gridview will not display
anything. Not even column headings. I have a text box, drop down list,
button and a label on the page and they all display fine.
Why won't the gridview do it's job?

Thanks
Mike

Jan 10 '07 #1
3 3742
We'll probably need more info....first - are you creating a Dataset - and
the data you can preview is buy using that with the objectDatasource?

Also - have you remembered to tie the ObjectDataSource to the Gridview?

Also - when you try running the query in the database, does it return data?
(just hitting the first things I can think of)
--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com

"Mike" <mc*****@gmail.comwrote in message
news:11*********************@o58g2000hsb.googlegro ups.com...
I'm using the 2.0 framework and cannot get a gridview to return records
with an objectDataSource.
I can preview the data from the datatable.
To make this as simple as possible I used the wizard and turned all
paging and sorting options off and the gridview will not display
anything. Not even column headings. I have a text box, drop down list,
button and a label on the page and they all display fine.
Why won't the gridview do it's job?

Thanks
Mike

Jan 10 '07 #2
are you creating a Dataset
Yes, I created a dataset and pulled a stored procedure over that
does a simple select statement.

the data you can preview is buy using that with the objectDatasource?
Again yes, I can preview the data using the objectdatasource.

have you remembered to tie the ObjectDataSource to the Gridview?
I tried doing this in code and also using a wizard

when you try running the query in the database, does it return data?
when I call the stored procedure from query analyzer I get a result
set.

All the stored procedures in SQL Server have been tested and work.

The data layer is most of the way completed. Now I can't get something
that should be simple to work. Tried using all the wizards just to see
if there was something I was missing but nothing is working.

I'm using Visual Web Developer 2005 Express Edition.

Thanks
Mike

Jan 11 '07 #3
Figured out the problem. Has to do with the input parameters. For some
reason you can preview the data from the dataset with empty strings but
when creating a datasource (either Sql or Object) you have to supply a
value for all input parameters. I even change the setting for
ConvertEmptyStringToNull to False and that still didn't work.
I have no idea why this is the case. I guess the way around this is to
use the % as the default value.

Anyone else know why this is the case?

Thanks again
Mike

Jan 11 '07 #4

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

Similar topics

0
by: Martin B | last post by:
Hallo to everyone! Problem: -------- GridView Exception: reentrant call to the SetCurrentCellAddressCore function System: ------- WinXP Professional, english, .NET Framework 2.0 Beta...
1
by: Jon S via DotNetMonster.com | last post by:
HI all, I'm returning a dataset to a gridview control. When the gridview asp.net control is populated from the returning dataset some of the cells remain empty. This is expected as some data...
3
by: Carlos Albert | last post by:
Hello everybody, I'm using some gridviews with datalists inside template columns. Now, for each datalist I'm calling a method returning a dataset (depending from a column from the gridview). ...
5
by: MarkAurit | last post by:
I have a gridview that some boundfield and buttonfield controls. I have a data element I 1. want to use when the button is clicked for a given row, but 2. dont want it visibly displayed in the...
4
by: Curious Trigger | last post by:
Hi there, I have got a gridview showing a display-name of a person and keeping its person-id as value accessible. Now I am wondering how I can get to his age, if this field isn't visible in...
1
by: Mike Collins | last post by:
I've seen how to set up a gridview at design time, but I believe I need to do this and run time and cannot figure it out. I am sending a concatenated list of IDs that is gets bigger each time a...
8
by: Greg Lyles | last post by:
Hi all, I'm trying to develop an ASP.NET 2.0 website and am running into some real problems with what I thought would be a relatively simple thing to do. In a nutshell, I'm stuck on trying to...
0
by: =?Utf-8?B?QVZM?= | last post by:
Hi I want to implment cusotm sorting in gridview... Ive a dropdown box on my page where ive all the fields(columsn) to be sorted.. whenever hte user selects the value in the dropdown , the...
4
by: csgirl87 | last post by:
I am new to asp.net i am using it with vb.net language i had do the code .. and it is returning the result in a textbox right now cause i don't know how to returned it in a gridview .. i...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.