'Code By Kiran Reddy 'Properties and Methods of Flex Grid in VB
'Controls MSHFlexGrid name = MSHFlexGrid1, CommonDialog name = CommonDialog1
'Refer above controls from components list
'Setting FlexGrid Number of Columns
MSHFlexGrid1.Cols = 4
'Adding Col
MSHFlexGrid1.Cols = MSHFlexGrid1.Cols + 1
'Setting g FlexGrid Number of Rows
MSHFlexGrid1.Rows = 5
'Adding Row
MSHFlexGrid1.Rows = MSHFlexGrid1.Rows + 1
'Adding and Removing Items (This is not good way of code
better set rows and use textmatrix)
MSHFlexGrid1.AddItem "youtext", 1
MSHFlexGrid1.RemoveItem 1
'Setting FlexGrid Cell Text
Dim yourstring As String
yourstring = "yourname"
MSHFlexGrid1.TextMatrix(2, 2) = yourstring
'Getting FlexGrid Cell Text
Dim yourstring As String
yourstring = MSHFlexGrid1.TextMatrix(2, 2)
'Setting Current row
MSHFlexGrid1.Row = 2
'Setting Current Column
MSHFlexGrid1.Col = 2
'Setting FlexGrid Column Width
inti = 0
Do Until inti = MSHFlexGrid1.Cols - 1
MSHFlexGrid1.ColWidth(inti) = 1000
inti = inti + 1
Loop