Results 1 to 4 of 4

Thread: Update Msflexgrid Contents

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    29

    Update Msflexgrid Contents

    I'm using VB 6 & Sql sever 2000.

    My problem is that when a record is deleted, the flexgrid still shows the record that has been deleted.

    The delete button & the flexgrid are on the same form.
    (I'm using tabs:- delete takes place on 1 tab and the flexgrid can be viewed on another tab).

    The database is updated using an ADO connection.

    I've tried refreshing the contents of the flexgrid but it does not work.

    However, when the form loads the flexgrid is filled from the database & hence it gets updated.

    How can I solve this problem???

  2. #2
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: Update Msflexgrid Contents

    refresh your recordset first then reload those data to your msflexgrid.
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

  3. #3
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Thumbs up Re: Update Msflexgrid Contents

    just remove the row from the grid
    a=row number
    VB Code:
    1. Private Sub Command1_Click()
    2. VSFlexGrid1.Rows = VSFlexGrid1.Rows - 1
    3. End Sub
    4.  
    5. Private Sub Command2_Click()
    6. VSFlexGrid1.RemoveItem (A)
    7. End Sub

  4. #4
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    266

    Re: Update Msflexgrid Contents

    Make function to fill the grid and then call the function whenever u want to refresh it means after deletion call fill grid function again

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