I am just beginning to work w/ LINQ. I have a data model set up and put a LinqDataSource and GridView on a page. It binds & displays ok, including paging and sorting.
How do I enable editing? I followed a blog by ScottGu to edit using the GridView. Clicking on the smart tag of the GridView in Design view, there are no checkboxes to enable editing or deletion, as there would be for a SqlDataSource bound grid. I thought the LinqDataSource enabled two way binding, similarly to the SqlDataSource. Is this not correct?
If it is correct, how to do I enable editing? I have configured the LinqDataSource to enable automatic deletes, inserts and updates. I have also tried manually adding a CommandField column to the GridView. Nothing seems to work. Here is the markup for the LinqDataSource:
<asp:LinqDataSource ID="LinqDataSource1" runat="server"
EnableDelete="True" EnableInsert="True" EnableUpdate="True"
Select="new (ProductID, Name, MakeFlag, SafetyStockLevel, ReorderPoint)"