[英]How to bind data from internal database to devExpress gridcontrol
I am an newbie, programming on devExpress silverlight application. 我是新手,正在devExpress silverlight应用程序上编程。 I created a database by adding
new item
, and i added Database1.mdf
in to solution trial.web
. 我通过添加
new item
创建数据库,并将Database1.mdf
添加到解决方案trial.web
。 When i create my project it had 2 solutions: DXSilverlightApplication1
(contains MainPage.xaml/.cs
) and Trial.Web
(contains DXSilverlightApplication1TestPage.aspx/.html
). 创建项目时,它具有2个解决方案:
DXSilverlightApplication1
(包含MainPage.xaml/.cs
)和Trial.Web
(包含DXSilverlightApplication1TestPage.aspx/.html
)。
I really have no idea how to bind data from an MDF file to devExpress grid control. 我真的不知道如何将MDF文件中的数据绑定到devExpress网格控件。 MY data base has 2 columns: Name and ID only.
我的数据库有2列:仅名称和ID。 Please help me.
请帮我。
Create a table adapter that does a basic SELECT: 创建一个执行基本SELECT的表适配器:
SELECT * FROM YourDatabaseName
Once you have done that on the top right corner of your GridControl select the data source (in our example the basic SELECT
statement). 完成此操作后,请在GridControl的右上角选择数据源(在我们的示例中为基本的
SELECT
语句)。 Hope this helps. 希望这可以帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.