sql Count function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jtnpham@gmail.com

    #1

    sql Count function

    Is there any way to count the number of rows displayed in a data grid
    view and then store that number to a variable? For instance, my sql
    statement to display the data table displays only four rows, so then I
    would like my n = 4. And it would change accordingly to however many
    rows are displayed.

    Thanks! =)

    Any help would be wonderful!!!

  • =?Utf-8?B?TWF1cmljZU0=?=

    #2
    RE: sql Count function

    Hi,

    what about
    this.dataGridVi ew.Rows.Count

    (replace dataGridView by the name of your datagridview)



    "jtnpham@gmail. com" wrote:
    Is there any way to count the number of rows displayed in a data grid
    view and then store that number to a variable? For instance, my sql
    statement to display the data table displays only four rows, so then I
    would like my n = 4. And it would change accordingly to however many
    rows are displayed.
    >
    Thanks! =)
    >
    Any help would be wonderful!!!
    >
    >

    Comment

    • jtnpham@gmail.com

      #3
      Re: sql Count function

      On May 21, 11:45 am, MauriceM <Mauri...@discu ssions.microsof t.com>
      wrote:
      Hi,
      >
      what about
      this.dataGridVi ew.Rows.Count
      >
      (replace dataGridView by the name of your datagridview)
      >
      >
      >
      "jtnp...@gmail. com" wrote:
      Is there any way to count the number of rows displayed in a data grid
      view and then store that number to a variable? For instance, my sql
      statement to display the data table displays only four rows, so then I
      would like my n = 4. And it would change accordingly to however many
      rows are displayed.
      >
      Thanks! =)
      >
      Any help would be wonderful!!!- Hide quoted text -
      >
      - Show quoted text -
      didn't work out so good... =X

      Comment

      Working...