我在 Mongodb 的列表中有一个 datagridview bould。但是我无法编辑网格。我不知道为什么会这样?
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();