Editing Entity

5 posts, 1 answers
  1. Bernard
    Bernard avatar
    6 posts
    Member since:
    Feb 2009

    Posted 18 Mar 2009 Link to this post

    Hi Everybody,

    I wonder how i can implement the following concept.
    I want to use a grid to display listing of data, in the present case, vendors.
    To edit those records, i want to pass the grid DataBoundItem as datasource to another Form.
    Like this the data would be edited directly into the grid via the DataBoundItem.

    The folloing code reprensent the binding to the editor from the listing form.
    FrmVendeurEditeur frmEditeur = new FrmVendeurEditeur();  
    frmEditeur.DataSource = (Vendeur) this.radGridView1.CurrentRow.DataBoundItem ;  
    frmEditeur.ShowDialog(); 

    The Following code represent the assignation into the editor
    public Vendeur DataSource  
    {  
        get { return (Vendeur) this.vendeurBindingSource.Current; }  
        set { this.vendeurBindingSource.DataSource = value;       }  
    }   
     

    In fact the binding work perfectly, but when i try to modify any field into the editor Open Access throw an exception

     

    A first chance exception of type 'Telerik.OpenAccess.Exceptions.InvalidOperationException' occurred in Telerik.OpenAccess.dll 


    What am i missing?
  2. Bernard
    Bernard avatar
    6 posts
    Member since:
    Feb 2009

    Posted 19 Mar 2009 Link to this post

    Hi Myself,

    Finally i found the problem with my approach....  I simply had to include the whole process in a Transaction to enabled editing...  Simple but you have to know it.

    Factually, it update the grid as i edit field in the editor form and when i commit or flush the transaction everything is update...  Magical compare to the standard VStudion Adonet approach.

    Thank you Telerik,  but consider a good documentation as urgent for people like me who begin with this product.   I have been discouraged many time but i'm Persistant.
  3. DevCraft banner
  4. PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 19 Mar 2009 Link to this post

    Hello Bernard,
    although we went through some major help rewriting for our last release our quest for improving the help is far from over. We are continually looking into new ways to enhance the support materials as much as possible and in order to achieve our goal we would really like to get feedback from our customers on what they like/dislike and what they want to see improved.  Thank you for the suggestion.

    All the best,
    PetarP
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Bernard
    Bernard avatar
    6 posts
    Member since:
    Feb 2009

    Posted 19 Mar 2009 Link to this post

    Hi PetarP,

    I understand the point.  For my self i would appreciate a documentation based on application of principle of data management.  A bit like the code library or even the forum, but with more direct answer.  We know that there is common task we all have to accomplished in software developpement and beginning with that clearly explained would be a great enhancement to your product and all new comer to open access ORM.

    For my self i did a lot of experimentation and i start to understand the power of this product, but just the need to enclose in a transaction any modification operation on entity was not clear to understand at the base.  But since there, wow, and re wow...  I love it.

    Also would it be interesting to understand the way concurrency management work.  The relation in nested relation.  etc..

    Thank you for your attention.

  6. Answer
    PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 19 Mar 2009 Link to this post

    Hello Bernard,
    I think you will be very happy to know that we are trying to do the same. We are reorganizing the help to be much more task oriented than rather just plain text. Although we already did a lot of documentation fixes rest assured that there is much more to come.
     As for the concurrency management I believe that you will find this topic really useful to you.

    Sincerely yours,
    PetarP
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
DevCraft banner