A flex grid is a common tool used in programming to display information in a row and column format. Flex grids have both horizontal and vertical scroll bars to make user navigation easier. In Visual Basic, a grid on a user interface form can be designed using the "MSFlexGrid" control. The information displayed on the grid usually comes directly from a database table or, in some instances, programmers write the codes to display data on the grid for user evaluation.
Things Youll Need:
- Computer
- Visual Basic software
-           Step 1Load an existing Visual Basic project by clicking "File" and "Open Project" from the Visual Basic environment and browsing for the filename from the dialog box that pops up. Alternately, you can open the project directly by double-clicking the "[ProjectName].vbp" file from the folder where you last saved your project. 
-           Step 2Open the "Form" with the FlexGrid control you want to work on. 
-           Step 3Double-click the control on the form that will trigger the action to delete the row on the flex grid. This is usually a command button with the caption "Delete" or similar controls. 
-           Step 4Write source code similar to the following on the controls "Event" you chose in Step 3: 
 With MSFlexGrid1
 If (.Rows > .FixedRows + 1) Then
 .RemoveItem.Row
 Else
 .Rows = .FixedRows
 End If
 End With
-           Step 5Save your work by clicking "File" and "Save Project" on the menu or by pressing "Ctrl" + "S" on the keyboard. 
-           Step 6Back up your database table to revert the data after testing is done. 
-           Step 7Click "Run" and "Start" on the menu to run the program. The flex grid should display data from a database table from which the control is bound. 
-           Step 8Delete one row of record by clicking the "Delete" button. Repeat the same process to check if the program is running as it should. 
-           Step 9Exit "Run" mode and compile your project by clicking "File" and "Make [ProjectName].exe" on the menu.