473,414 Members | 1,776 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,414 software developers and data experts.

How to determinate if a GridView is empty

ad
Hi,
How to determinate if a Gridview is empty?
Jun 19 '06 #1
4 1413
Do this

gridview1.rows.count = 0
"ad" <fl****@wfes.tcc.edu.tw> wrote in message
news:ez**************@TK2MSFTNGP03.phx.gbl...
Hi,
How to determinate if a Gridview is empty?

Jun 19 '06 #2
ad
Thanks,
I thought it can do before.
But when there is header row in a gridview, it is empty, but
gridview.rows.count will be larger than zero.

"Rotsey" <ma***********@RemoveThis.optusnet.com.au> ¼¶¼g©ó¶l¥ó·s»D:Oe**************@TK2MSFTNGP05.phx.g bl...
Do this

gridview1.rows.count = 0
"ad" <fl****@wfes.tcc.edu.tw> wrote in message
news:ez**************@TK2MSFTNGP03.phx.gbl...
Hi,
How to determinate if a Gridview is empty?


Jun 19 '06 #3

ad wrote:
Hi,
How to determinate if a Gridview is empty?


Why don't you check the dataset you bind to the gridView ?

Jun 19 '06 #4
There is a EmptyDataTemplate in the GridView that's displayed when there
are no rows -- perhaps this will give you what you need/want?

-Brock
http://staff.develop.com/ballen

Hi,
How to determinate if a Gridview is empty?

Jun 20 '06 #5

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...
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...
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
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
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
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
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.