OpenAccess, RadGridView, CRUD and Cancel operation

2 posts, 1 answers
  1. Urzad Kontroli
    Urzad Kontroli avatar
    1 posts
    Member since:
    Oct 2008

    Posted 09 Apr 2010 Link to this post

    Hi,
    I have a problem with properly refreshing radGridView control after cancelling record editing. 

    In my application there is a radGridView bound to OpenAccess's objectView. When a user click a row in that grid a new form is displayed and there is a possibility to edit that row. There are controls in this form that are bound to different objectView which uses the same object scope as grid does. When user changes some values, these values change in both: controls in form and in a grid. Nothing special here.
    The problem is when user change the value in form and then click Cancel button (there is the code on click: scope.Transaction.Rollback(); EditForm.Close;) - grid doesn't refresh, I mean grid displays values as they were in edit form after changing. It only refreshes if I minimalize or change the size of window which contains that grid. I tried to call grid.Refresh(), grid.Invalidate(), grid.Update() with no success.  

    I saw that the same behavior is in OpenAcces example (3_OpenAccessInApplications - project 2B_MyWinFormCrud).
    Is it a bug or am I doing something wrong ?

    I would be gratefull if you could support an example of properly doing record editing in form (and not in a gridView) with the use of OpenAccess.

    Thanks in advance

    Piotr 
  2. Answer
    Serge
    Admin
    Serge avatar
    375 posts

    Posted 13 Apr 2010 Link to this post

    Hello Urzad Kontroli,

     You can use the PerformRefresh method of the objectView to retrieve the data from the underlying source. The grid is bound to the objectView and in its state the data is not refreshed thus you need to refresh it.

    I am also replying here, so that the community can have this as a future reference.

    Regards,
    Serge
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
Back to Top