| It's been a long time, but all you need to do is increase the number of rows
in the grid object. Something like
grdd1.rows=grid1.rows+3
The new rows are added at the end of the grid. You will need to set their
height properties, and any other properties that are not standard. If what
you want is to add rows in the middle of a grid, you add the new rows at the
end, and then move the existing rows to make room for the empty rows.
|
| Yes, setting grid1=grid1+something creates new rows in the Grid, but what
I want is to fill the rows with data.
Grid1.AddItem text, puts data on one row. What I want is to fill all the rows
with only a VB statement, not having to repeat AddItem a lot of times (suppose
I want to fill 100 rows).
Can I use some "special" character in "text" (I've tried CR, LF...), so as to
fill all the rows with data?
Thanks in advance,
Patricia de las Heras
[Posted by WWW Notes gateway]
|
|
Patricia,
what you need to do is to build a string that holds your cell
values separated by a TAB (Chr$(9)) between cells on a line
and a CR (Chr$(13)) between lines. So a string to paste to
2 lines of two cells would be:
sTemp = "Cell(1,1)" & Chr$(9) & "Cell(1,2)" & Chr$(13) & _
"Cell(2,1)" & Chr$(9) & "Cell(2,2)"
You then need to select the range of cells that you are to
paste into:
grdMyGrid.SelStartRow = ...
grdMyGrid.SelStartCol = ...
grdMyGrid.SelEndRow = ...
grdMyGrid.SelEndCol = ...
then you can paste all in one go by:
grdMyGrid.Clip = sTemp
Hope this helps,
Steve
|