views:

20

answers:

0

i have a datagridview bould on a list from Mongodb. however i cannot edit the grid. I dunno why its like that?

`var connstr = "Server=localhost:27017";

        mongo = new Mongo(connstr);
        mongo.Connect();

        IMongoDatabase TorontoTrader = mongo["TorontoTrader"];
        IMongoCollection TradingStrategyCollection = TorontoTrader["TradingStrategyRefresher"];
        IEnumerable<Document> docs = from doc in TradingStrategyCollection.Linq()
                   where (int)doc["TriggerBarId"] == 102
                   select doc;


        dataGridView1.ReadOnly = false;
        dataGridView1.DataSource = docs.First().ToList();
         `