Tuesday, 11 December 2007

Tip - Making your LINQ datasource do all the work for you

One of the important things to remember when trying to get your LINQ datasources to do 2-way binding is to set the "EnableInsert" and "EnableUpdate" attributes to true. Otherwise, nothing will be inserted/updated when you click on the Edit/Insert link in your bound control (e.g. Telerik RadGrid)



   1:      <asp:LinqDataSource ID="OdsRiskManagementDataSource" runat="server" 
   2:          ContextTypeName="LendLease.MRP.Service.Persistence.Entity.MRPDataContext" EnableUpdate="true" EnableInsert="true"    
   3:          TableName="ODS_Risk_Managements">
   4:      </asp:LinqDataSource>    

2 comments:

Jeramy S Hick said...

I found this explanation very helpful, thank you for the guidance. Read this profile to explore more Aim Trainer. Aim Trainer shows progress when practiced regularly.

Jeramy S Hick said...

Thank you for breaking everything down so effectively, it was very useful. Read this article Spacebar Clicker. The spacebar clicker boosts hand–eye coordination through repeated tapping actions.