When i use the results of a linq-to-xml query to populate a datagridview, i cannot edit the datagridview. i've tried setting the datagridview's readonly property to false and that doesn't help. I also added an event handler for cellBeginEdit and put a breakpoint there, but it doesn't get hit. Any idea what i'm doing wrong, or if this isn't possible?
public class MergeEntry
{
public string author { get; set; }
public string message { get; set; }
}
...
var query = from entry in xmlDoc.Descendants("entry")
select new MergeEntry
{
author = entry.Element("author").Value,
message = entry.Element("msg").Value,
}
var queryAsList = query.ToList();
myBindingSource.DataSource = queryAsList;
myDataGridView.DataSource = myBindingSource;