Results 1 to 6 of 6

Thread: Add and Delete in Msflexgrid[RESOLVED]

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2005
    Posts
    4

    Resolved 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
    Last edited by vandu_urfriend; Mar 9th, 2005 at 01:32 PM.

  2. #2

  3. #3
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    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:
    1. MSHFlexGrid1.AddItem ""
    2.    
    3. If MSHFlexGrid1.RowHeight(MSHFlexGrid1.Rows - 1) = 0 Then
    4.    MSHFlexGrid1.RowHeight(MSHFlexGrid1.Rows - 1) = 240
    5. End If

    For more information see the following KB article.
    FIX: Changes to MSHFlexgrid Adding/Removing Records Not Visible

  4. #4
    New Member
    Join Date
    May 2007
    Posts
    11

    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.

  5. #5
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Add and Delete in Msflexgrid[RESOLVED]

    Upgrade to at least service pack 3 or use the code that was posted.

  6. #6
    New Member
    Join Date
    May 2007
    Posts
    11

    Re: Add and Delete in Msflexgrid[RESOLVED]

    where can I find the link to download the service pack 3 ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width