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

EntityDataSource updating with RadGrid.

1 Answer 131 Views
Grid
This is a migrated thread and some comments may be shown as answers.
matt
Top achievements
Rank 1
matt asked on 04 Oct 2010, 06:04 PM

I had a similiar question but I didnt see an answer so...

I am updating a Org item... but I need to updated the 'updatedby' and 'updateddate' which I must do programmatically since it is not part of the radgrid... How do I do this ?

Here is how I am trying to do it but the break point is not being hit.. is this the right way to get my custom update?  I suppose I COULD create a seperate stored procedure.. but it would be nice if I could keep it in the entities world.

<asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=G3TEntities"
          DefaultContainerName="G3TEntities" EnableFlattening="False" EnableInsert="True"
          EntitySetName="Orgs" EnableUpdate="True" OnUpdated="EntityDataSource1_Updated">
      </asp:EntityDataSource>
   protected void EntityDataSource1_Updated(object sender, EntityDataSourceChangedEventArgs e)
      {
          Org oOrg = new Org();
          oOrg = (Org)e.Entity;
          oOrg.updateby = 69;
      }

1 Answer, 1 is accepted

Sort by
0
matt
Top achievements
Rank 1
answered on 04 Oct 2010, 06:10 PM
I found the answer.. wow that is easy!!.. though I suppose if I had to update more than one table things would get complex.
 
http://www.telerik.com/community/forums/aspnet-ajax/grid/any-samples-that-user-entity-framework-not-declarativley-for-crud-operations.aspx
Tags
Grid
Asked by
matt
Top achievements
Rank 1
Answers by
matt
Top achievements
Rank 1
Share this question
or