LINQ With DataGridView In C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bizdata
    New Member
    • Mar 2008
    • 1

    LINQ With DataGridView In C#

    Hello

    In C# I am trying to populate a grid view with a result of a LINQ Query as follows:

    dc stands for DataContext

    var ItemList = (from items in dc.Products
    select new { items.ItemCode, items.ItemName });
    dataGridView1.D ataSource = ItemList;

    (dc stands for DataContext)

    It works fine, however I cannot modify the values in the gird sine the value are read only, what am I missing to be able to edit the values?
Working...