I have the code below:
Dim ds As New DataSet
Dim sda As System.Data.SqlClient.SqlDataAdapter
Dim sSQL As String
Dim strCon As String
sSQL = " .... MY QUERY HERE .... "
strCon = appBase.dbConnString
sda = New System.Data.SqlClient.SqlDataAdapter(sSQL, strCon)
sda.Fill(ds, "MY TABLE FROM DB")
dgRecordsContent.DataSource = ds.Tables("MY TABLE FROM DB")
dgRecordsContent.DataBind()
dgRecordsContent.Visible = True
dbConn.Close()
How can I programatically count the number of rows from the datagrid that I'm showing the values in?
Fillis a method returning the number of rows