In this session we will discusses how to utilize MSHFlexgrid which can be edited with the help of the textbox control. Now just open your Visual Basic program. Then create a new project, add MSHFlexgrid control and a textbox control. For example we are setting the grid has 10 rows and 10 columns, then diform form load event add the following command:
 
 
 Private Sub Form_Load()
     MSHFlexGrid1.Rows = 10
    MSHFlexGrid1.Cols = 10
 End Sub
 

 Later in the event of MSHFlexgrid entercell, give the following command:
 
 Private Sub MSHFlexGrid1_EnterCell()
       Text1.Height = MSHFlexGrid1.CellHeight
       Text1.Width = MSHFlexGrid1.CellWidth
       Text1.Top = MSHFlexGrid1.CellTop + MSHFlexGrid1.Top
       Text1.Left = MSHFlexGrid1.CellLeft + MSHFlexGrid1.Left
 End Sub
 

         If the program is run then the result is, the textbox control will be in a position in the grid cell that we choose.
 
Attach textbox to MSHFlexgrid

 
 
 

More topic of Mshflexgrid
 
 -. How to Use MSHFlexgrid ?
 -. Mshflexgrid with Adodc
 -. Editable MSHFlexgrid
 -. Select Single Cell in MSHFlexgrid
 -. MSHFlexgrid select a cell and change background
Categories: