Add and Delete in Msflexgrid[RESOLVED]
hi frnds,
I am using MSHFlexGrid in my project
from the text boxes I am adding item in the grid using Additem method
this works on the click of cmdAdd button
I delete a particular row from the grid using RemoveItem method on click of cmdDelete button
Now the problem is after deleting any row if i try to add It doesnt show anything in grid even though the function runs properly.
I have to press cmdadd button for same number of times i have deleted rows.
Can U plz help me out
thankz
Re: Add and Delete in Msflexgrid
Please post your delete code.
Re: Add and Delete in Msflexgrid
There is a bug in the MSHFlexGrid that was fixed in VB Service Pack 3.
Basically, when you remove a Row using RemoveItem and then use AddItem the RowHeight of the new Row gets set to 0.
A work around for the problem is something like.
VB Code:
MSHFlexGrid1.AddItem ""
If MSHFlexGrid1.RowHeight(MSHFlexGrid1.Rows - 1) = 0 Then
MSHFlexGrid1.RowHeight(MSHFlexGrid1.Rows - 1) = 240
End If
For more information see the following KB article.
FIX: Changes to MSHFlexgrid Adding/Removing Records Not Visible
Re: Add and Delete in Msflexgrid[RESOLVED]
Quote:
Originally Posted by vandu_urfriend
hi frnds,
I am using MSHFlexGrid in my project
from the text boxes I am adding item in the grid using Additem method
this works on the click of cmdAdd button
I delete a particular row from the grid using RemoveItem method on click of cmdDelete button
Now the problem is after deleting any row if i try to add It doesnt show anything in grid even though the function runs properly.
I have to press cmdadd button for same number of times i have deleted rows.
Can U plz help me out
thankz
what's the solution?? I also have that problem.
Re: Add and Delete in Msflexgrid[RESOLVED]
Upgrade to at least service pack 3 or use the code that was posted.
Re: Add and Delete in Msflexgrid[RESOLVED]
where can I find the link to download the service pack 3 ?