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

is gridview empty?

how do i tell if i got back records (in code)
thanks
Jan 19 '07 #1
2 1358
What structure are you getting your data back in? For a SqlDataReader use
the HasRows property. For a DataTable use Rows.Count.

"Mr. SweatyFinger" <sw@sw1finger.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
how do i tell if i got back records (in code)
thanks

Jan 19 '07 #2
EmptyDataTemplate can be useful in the GridView when there are no rows,
otherwise you can normally use ds.Tables("myTable").Rows.Count

--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Mr. SweatyFinger" <sw@sw1finger.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
how do i tell if i got back records (in code)
thanks

Jan 19 '07 #3

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

Similar topics

7
by: Ken | last post by:
Hi All - I have a filtered GridView. This GridView has a check box in the first column. This check box is used to identify specific rows for delete operations. On the button click event I...
1
by: paulmac106 | last post by:
Hi, I have a gridview based on a SQL stored procedure. I then want to let the user filter the results by 4 textboxes. When all 4 textboxes have "some" search criteria the gridview works fine,...
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...
1
by: jmdolinger | last post by:
Hi all, I'm a newbie to Atlas (and recently ASP.NET) after coming from a long Java background, also have done quite a bit with an Ajax.NET/ASP.NET 1.1 project, but it was basically all...
3
by: igotyourdotnet | last post by:
How can I add a empty row to my gridview? example: column 1 column2 row 1 row2 row3 row4 empty row across the grid row5
4
by: =?Utf-8?B?Vmlua2k=?= | last post by:
Hello Everyone, I have a gridview. I am using template columns inside the gridview. When I display the gridview on the web page and if there is no value in a particular cell, gridline disappaers...
2
by: Bart | last post by:
Hi, i need to check wether a cell of a gridview is empty or not. I did this: Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles...
0
by: Andy B | last post by:
I have the following gridview. There are 2 other textBoxes and a button on the page as well. When somebody puts text into the 2 textBoxes and presses the add button, it puts the values of those...
1
nitindel
by: nitindel | last post by:
Hi All, Please tell me any good site for Gridview control.(not for datagrid). I am facing error in fetching the values of the Bound columns in the gridview: lease tell me how should i...
3
by: Peter | last post by:
I have a GridView which is populated by List<ofObjects> Does anyone have example of how to sort the columns of this GridView? I have found examples without DataSourceControl but these use...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.