This article describes the easiest way of editing gridview by using LINQ data source andÂ
      DataContext.
       Explained step by step as below,
1)Â Â Â Â Â Create DataContext using Northwind Database.
 Drag and drop the Product table in to Northwind.dbml datacontext, as shown below.
|
Â
2)Â Â Â Â Â Add Grid view to webform and choose datasource for the Gridview.
Choose new datasource as LINQ which will add new LINQ datasource to page as shown below.
|
Â
3)Â Â Â Â Â Configure the datasource
Choose the all column of the Product Table and also tick the advanced options.
Â
 |
Â
And enable the editing option of the grid view.
Â
 Â
Â
Yes you are done! When you run page you will see the grid is populated with all products and you also find the edit link with each row as shown below.
               |
Â
Â