|
-
Apr 8th, 2003, 05:58 PM
#1
Thread Starter
New Member
**Resolved** Remove & Add rows to a MSHflexGrid?
I Know how to delete and add rows to a MSHFlexGrid but
this occurs:
1.- I add row 1 and write in it, fine
2.- I add row 2 and write in it, fine
3.- I delete row 1, and it works.
4.- I add another row (row 2) and this row isnt displayed
5.- I add another row (row 3) and row 2 is displayed
what i have to do for the Grid properly refreshes
thanks
Last edited by Oscar Ashkroft; Apr 11th, 2003 at 10:52 AM.
-
Apr 8th, 2003, 09:05 PM
#2
Try the .Refresh method of the grid.
-
Apr 9th, 2003, 07:31 AM
#3
Thread Starter
New Member
negative
-
Apr 9th, 2003, 07:51 AM
#4
Hyperactive Member
Thank you!
I've had this problem before multiple times.
I've heard there is a fix if you update to
Service Pack 6 or something but I just created
a remove function that works. The .Remove
method is the proplem.
Pass the grid and the row to this sub to
remove the row.
VB Code:
Public Sub RemoveRow(ByRef p_MSHFlexgrid As MSHFlexGrid, p_RowIndex As Integer)
Dim rowIndex As Integer
Dim colIndex As Integer
For rowIndex = p_RowIndex To p_MSHFlexgrid.Rows - 2
For colIndex = 0 To p_MSHFlexgrid.Cols - 1
p_MSHFlexgrid.TextMatrix(rowIndex, colIndex) = p_MSHFlexgrid.TextMatrix(rowIndex + 1, colIndex)
Next
Next
p_MSHFlexgrid.Rows = p_MSHFlexgrid.Rows - 1
End Sub
-
Apr 11th, 2003, 10:44 AM
#5
Thread Starter
New Member
thanks for everything, anyway
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|