473,569 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Count Items in a dataset?

I'm trying to do an item count of a datagrid but my problem is that the
datagrid is paged and I only get a count for the number of rows in one page
as oppose to the whole dataset which has been bound to it.

Is there some easy way to count the items in a dataset instead or another
way around this.

Cheers for any help anyone can give me.
Jul 21 '05 #1
3 5075
from memory

myDataSet.Table[0].Rows.Count
Jul 21 '05 #2
Stephen,

Please don't multipost. It is not any problem to do X posting in the dotnet
newsgroups. (Sending one message to more relevant newsgroups in one time)
Than we can benefit from each other answer. And is not everybody giving the
same answer.

I answered you in another newsgroup.

Thanks in advance.

Cor
Jul 21 '05 #3
Josh,

myDataSet.Table[0].Rows.Count


I had almost ansered this as well. And probably is this meant, however this
count the *rows* in the first table, not the *items* in all tables.

:-)

Cor
Jul 21 '05 #4

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

Similar topics

3
7478
by: Wayne Wengert | last post by:
I am trying to populate a combobox with a lisy of items. I want the 1st item to be "Make a Selection" and the following items will be names from a table in my DB (See code below). When I run the project, the combox box initially displays an empty selection. When I click on the drop down arrow I see the "Make a Selection" followed by the...
5
5967
by: Michael Krzepkowski | last post by:
All, I have a view that returns the following values: Item Vendor 70807 1234 70807 5678 If I am looking for items that have more than one vendor: select item_num,count(*)
2
55894
by: Michael Howes | last post by:
I have a single DataTable in a DataSet. It has 4 columns and i'd like to get a handful of counts of unique items in 3 of the 4 columns. Can a DataTables Select or Compute methods to COUNT DISTINCT? These two attempts failed DataRow dr = ds.Tables.Select( "COUNT(DISTINCT(site_name))" ); object x = ds.Tables.Compute(...
9
45450
by: Alpha | last post by:
Hi, How can I set all the items in a listbox to be selected? I can't find a property or mehtod to do it so I thought I'll try using setselected method but I need to find out how many items are in the listbox. Thanks, Alpha
2
3282
by: Alpha | last post by:
I have a window application. In one of the form, a datagrid has a dataview as its datasource. Initial filtering result would give the datavew 3 items. When I double click on the datagrid to edit the selected lie item at which case I would pop up a separate dialog box to do so, in the debugging code, the dataview.count would return 0. I get...
6
6686
by: Tejpal Garhwal | last post by:
I have datagrid filled with some data rows. At the run time i want know how many total rows are there in the data grid ? Any idea ? Any Suggestions ? Thanks in advance Tej
3
258
by: Stephen | last post by:
I'm trying to do an item count of a datagrid but my problem is that the datagrid is paged and I only get a count for the number of rows in one page as oppose to the whole dataset which has been bound to it. Is there some easy way to count the items in a dataset instead or another way around this. Cheers for any help anyone can give me.
1
4450
by: JustinCarmony | last post by:
I'm using a DataAdapter to fill a DataSet to display a list of items in a custom way. I'm not using the GridView or any server controls like that. This is my code: <code> SqlConnection sqlConn = DatabaseControl.Database.GetConnection(Globals.dbConn); SqlCommand cmdTitles = new SqlCommand(); cmdTitles.CommandText =...
1
24896
by: SePp | last post by:
Hello all, I want to display the number of items in an datagridview. I use this one datagridview for different datasets. The datagridview.Rowcount works fine for the most of the dataset. But there is one dataset which has more items than the others and the Rowcount wont work. The result is all the time 0, but it should be something...
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7673
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...
0
6284
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...
1
5513
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...
0
5219
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1213
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
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...

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.