How to refresh girdview?

3 posts, 0 answers
  1. Anil
    Anil avatar
    5 posts
    Member since:
    Dec 2008

    Posted 23 Jan 2009 Link to this post

    hi,

    When i delete or update records,changes stored in to database but grid view didn't show updated records.

    please send sample code gird view automatically refresh.

    Thank You
    Anil


  2. Marc Roussel
    Marc Roussel avatar
    429 posts
    Member since:
    Dec 2009

    Posted 21 Jan 2010 Link to this post

    I have the same issue where I add a new row and since the user do not enter the right data, I do CancelEdit() in RowEditEnded(..)
    I see that my code removing the pending object from the collection is removed and it is automaticly removed from the grid but the VISUAL of the grid keeps the new row there.

    Is there anyway to Refresh the grid ?

    if I use rgvTimes.ItemsSource = MyCollection again, it crashed in this event,
    rgvTimes.Rebind() make the application crashes too with : Object reference not set to an instence of an object

    But which object please ?
    when I get out of RowEditEnded, there's no place to go so where's the object not referenced ???
  3. DevCraft banner
  4. Marc Roussel
    Marc Roussel avatar
    429 posts
    Member since:
    Dec 2009

    Posted 21 Jan 2010 Link to this post

    Solved.

    I was just not using the AddingNewDataItem and RowEditEnded the right way.
Back to Top