DataGridView绑定源datacontext.ExecuteQuery allowusertoaddrows禁用 [英] DataGridView Binding Source datacontext.ExecuteQuery allowusertoaddrows disabled
本文介绍了DataGridView绑定源datacontext.ExecuteQuery allowusertoaddrows禁用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用以下代码:
Using the following code:
IQueryable data = db.ExecuteQuery<mytable>("SELECT * FROM MyTable").AsQueryable();
datagridviewbindingsource.DataSource = data;</mytable>
datagridview显示mytable很好,但是现在用户无法添加行.
使用此代码:
the datagridview shows mytable just fine, but now the user is not able to add rows.
Using this code:
IQueryable data = (from p in db.MyTable select p);
datagridviewbindingsource.DataSource = data;
用户可以向datagridview添加行.任何线索如何使用第一个代码片段使此选项可用?
the user is able to add rows to the datagridview. Any clue how to make this option available using the first codesnippet?
推荐答案
我现在正在使用Linq.Dynamics API.祝你好运!
I am now using the Linq.Dynamics API. More luck on that one!
这篇关于DataGridView绑定源datacontext.ExecuteQuery allowusertoaddrows禁用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文