473,657 Members | 2,392 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to determinate if a GridView is empty

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

gridview1.rows. count = 0
"ad" <fl****@wfes.tc c.edu.tw> wrote in message
news:ez******** ******@TK2MSFTN GP03.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.c ount will be larger than zero.

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

gridview1.rows. count = 0
"ad" <fl****@wfes.tc c.edu.tw> wrote in message
news:ez******** ******@TK2MSFTN GP03.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 EmptyDataTempla te 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
5465
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 loop through the filtered GridView to identify the selected rows and assemble some XML to be sent to a stored proc. The problem I have is that when looping through the GridView, it doesn't
1
2210
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, but if even one is left blank the gridview doesn't return any records. When I test the stored procedure itself it works fine. Can you help me work with the empty textboxes. thanks,
1
9377
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 in the dataset is empty. The cells that are empty, in the gridview control, I would like to have the value of 0 (zero) inserted. Is there a default cell value property or something similar for the asp.net gridview control. So if no data is...
1
3522
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 javascript, nothing really having to do with ASP.NET... I'm attempting to put together an application that consists of several GridView controls each bound to some xml data. Each table exists in its own update panel. The two effects I'm going for are:
3
3237
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
6629
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 around that cell.I want the grid lines to appear all the time even if the cell is empty. Can anyone tell me what am I doing wrong. Below is my gridview. I am showing only one template column. I have around 14 template column in the gridview.
0
2370
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 textBoxes into the DataTable. The gridView shows what values have already been entered into the DataTable. <asp:GridView ID="DefinitionList" runat="server" Caption="Dictionary entries" EmptyDataText="There are no definitions yet." AllowPaging="True"...
1
1844
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 fetch the value..of a bound column..?? Below is the code.:
3
5233
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 DataTable, I am using List of Objects. Here's one example: http://ryanolshan.com/technology/gridview-without-datasourcecontrol-datasource/
0
8411
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8739
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8613
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7351
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.