VSFlexGrid
VSFlexGrid
(OP)
Simple question...How do you add data to the cells? I have tried .Value, .AddItem, etc. with no luck. Thanks.
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
|
RE: VSFlexGrid
Single cells-
Range("A1").Value=3
Range("B3").Value="ABC"
Horizontal range-
Range("A1:J1").Value=Array(1,2,3,4,5,6,7,8,9,10)
Vertical range -
Range("A1:A10").Value=Worksheetfunction.transpose(Array(1,2,3,4,5,6,7,8,9,10))
'Dare to Imagine'
Mala Singh
RE: VSFlexGrid
VSFlexGrid.Cell(flexcpText, VSF.Row, 4) = YourValue
That sets column 4 in the current row to YourValue
Of course VSFlexGrid has to be editable (it's a property of the grid), you can set that in design mode or on the EnterCell event for example
Francis
RE: VSFlexGrid
I tried that but got an error saying that it cant find the project or library. I checked to make sure the VSFlexGrid reference was loaded and it was. Any ideas?
Thanks,
Brian
RE: VSFlexGrid
Do you have an example you can load to see if that works?
RE: VSFlexGrid
RE: VSFlexGrid
Please enlighten a dimwit!
Mala Singh
'Dare to Imagine'
RE: VSFlexGrid
http://www.componentone.com/products.aspx?ProductC...
Creigbm, do you have a license for the product?
RE: VSFlexGrid
RE: VSFlexGrid
RE: VSFlexGrid
Mala Singh
'Dare to Imagine'
RE: VSFlexGrid
RE: VSFlexGrid
Francist has already pointed out the solution - I am just elaborating on it with another example for others who may be interested.
You need to use the Cell property of the control to put values in the cells.
The syntax is:
[form!]vsFlexGrid.Cell(Setting As CellPropertySettings, [R1 As Long], [C1 As Long], [R2 As Long], [C2 As Long]) [ = Value ]
I suggest you look at the Help for details...
Example: The following code will fill the first 5 rows × 4 columns block of cells with numbers from 1 through 20.
CODE
With Me.VSFlexGrid1
For i = 1 To 5
For j = 1 To 4
.Row = i
.Col = j
.Cell(flexcpText, i, j) = (i - 1) * 4 + j
Next j
Next i
End With
End Sub
Mala Singh
'Dare to Imagine'
RE: VSFlexGrid
Mala Singh
'Dare to Imagine'
RE: VSFlexGrid
the simplest way to add values to the a vsflexgrid is to use the method
vsFlexGrid.TextMatrix(Row As Long, Col As Long)[ = value As String ]
where Row and Col are indexes for table's row and colums.
HTH
_LF
RE: VSFlexGrid
RE: VSFlexGrid
VSFlexGrid1.ColComboList(x) = "#0;Auto|#1;Direct|#2;Bezier|#3;Manual|#4;Connector"
To create one specific to a cell catch the EnterCell event and add
VSFlexGrid1.ComboList= "=|>|<|<>|>=|<="
This just lists operators and returns the selected one.
There are lots more options!
RE: VSFlexGrid
RE: VSFlexGrid
http://news2.componentone.com/cgi-bin/dnewsweb.exe...=
RE: VSFlexGrid
Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting
UK steam enthusiasts: www.essexsteam.co.uk
RE: VSFlexGrid
I cant seem to get the combobox to work. I used the exact syntax as above and didnt get the combobox to appear.
RE: VSFlexGrid