How to Get the Number of Rows in FlexGrid in Visual Basic

Written by allen stoner
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Get the Number of Rows in FlexGrid in Visual Basic
The flexgrid component provides more options and is more user-friendly. (ANSI image by DBX60 from Fotolia.com)

The flexgrid, created by ComponentOne, is a more robust grid component than the DataGridView available in Visual Basic by default. The two grid components are similar, but the flexgrid component provides more options and is more user-friendly.

Skill level:
Easy

Other People Are Reading

Things you need

  • ComponentOne FlexGrid
  • Visual Basic

Show MoreHide

Instructions

  1. 1

    Create a new project in Visual Basic based on the Windows Forms Application.

  2. 2

    Drop a flexgrid and select the form. Name the flexgrid, "fgTest" and the button, "btnRows".

  3. 3

    Set the property of the flexgrid to allow the user to enter data into the grid.

  4. 4

    Double click the button and add the following code to the button event:

    MessageBox(fgTest.Rows.Count.ToString)

  5. 5

    Run the program and enter some rows into the grid.

  6. 6

    Click the button and a message box should appear with the number of rows in the grid. Remember the header row will count as one.

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.