Results 1 to 3 of 3

Thread: refreshing datagrid

  1. #1

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075

    refreshing datagrid

    After I do a delete from my datagrid the record still shows on the grid unless you leave the page and come back. I placed

    'refresh the Datagrid
    OleDbDataAdapter1.Fill(DataSet11)
    DataGrid1.DataBind()


    after the delete, but it keeps the old data in the grid and give me the new data from the database. What is the correct way to refresh the grid after a delete?

  2. #2
    Junior Member
    Join Date
    Nov 2002
    Location
    Left past the postbox
    Posts
    30

    Reply

    What you want to do is execute the query again then fill the dataset.

    Chris

  3. #3
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    You have to restablish the communication between the dataset and the datagrid. The solution is setting the datasource property on the datagrid to the datasource (dataset). However, it all depends on how you actually have everything setup.

    Cheers
    Last edited by Lethal; Jan 2nd, 2003 at 11:45 AM.

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