I can't seem to find the correct property here...I have only found the DataGrid1.VisibleRowCount...I need all rows.
Thanks,
Sean
Printable View
I can't seem to find the correct property here...I have only found the DataGrid1.VisibleRowCount...I need all rows.
Thanks,
Sean
what are you using as a datasource? you can easily get the rowcount from the datasource.
something like this
dstReturn is the datasetCode:Me.BindingContext(dstReturn, "order_item").Count
order_item is the table on the dataset i want to get the rowcount from
I've been faced with the same problem for a little while now. I've got a web service that queries the database and pulls back a dataset. I needed to get the number of rows but could only find the visible row count property as well.
On the presumption that the data in the datagrid is mapped to a datable, simply code as follows:
dim mycount as integer
mycount = Ds1.Tables("mytable").Rows.Count
where Ds1 is the Dataset and mytables is the mappingname of the table the datagrind is bound to
Thanks for the code. I did find another way to do it using the rowcount of the dataset but it takes two trips to the web service.
Hi,
You could obtain the number of rows when you fill the dataset
VB Code:
Dim iCount As Integer iCount = da1.Fill(ds1, "TableName")
hi!
hope somebody can still answer this question... what if it's related to another table? how can i count the number of rows of that table?:confused:
Hi, I Have Asked Before And Still Cant Get it To Work as I Keep Getting it Underlined, Maybe a option Explicit or Strict Error. Here is a Example of how I Make My connection and Using the First, Next, Etc.
Will Someone please Make a password for the Database called Password and Configure the Connection so it will Work. It Usually asks for Username and Password when I Only Put In A Database Password.
Helping with the Find Button Will be A BONUS.
The Database is in the bin Folder. Place The Zip in The C:\ And Unzip.