Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a Row in a Flex Grid

Status
Not open for further replies.

tk7834

Programmer
Jul 9, 2002
15
0
0
US
I'm using a Flex Grid and need to add a row every time my code executes through a loop. Any ideas? Thanks!
 
The MSFlexGrid component has an AddItem method. For example: create a form with a MSFlexGrid and a command button. Put the below code in the buttons click event.

Private Sub Command1_Click()
Dim x As Integer
For x = 1 To 10
MSFlexGrid1.AddItem (x)
Next x
End Sub

This should add a new row on each loop.
 
You can also use the rows property to add a row like this

msFlexGrid1.rows = msFlexGrid1.rows + 1

The best method may depend on how you are filling your grid with data. Thanks and Good Luck!

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top