This is a migrated thread and some comments may be shown as answers.

Editing Entity

4 Answers 93 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Bernard
Top achievements
Rank 2
Bernard asked on 18 Mar 2009, 03:05 PM
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?

4 Answers, 1 is accepted

Sort by
0
Bernard
Top achievements
Rank 2
answered on 19 Mar 2009, 12:21 PM
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.
0
PetarP
Telerik team
answered on 19 Mar 2009, 01:12 PM
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.
0
Bernard
Top achievements
Rank 2
answered on 19 Mar 2009, 01:42 PM
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.

0
Accepted
PetarP
Telerik team
answered on 19 Mar 2009, 03:36 PM
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.
Tags
General Discussions
Asked by
Bernard
Top achievements
Rank 2
Answers by
Bernard
Top achievements
Rank 2
PetarP
Telerik team
Share this question
or