简体   繁体   中英

How to bind data from internal database to devExpress gridcontrol

I am an newbie, programming on devExpress silverlight application. I created a database by adding new item , and i added Database1.mdf in to solution trial.web . When i create my project it had 2 solutions: DXSilverlightApplication1 (contains MainPage.xaml/.cs ) and Trial.Web (contains DXSilverlightApplication1TestPage.aspx/.html ).

I really have no idea how to bind data from an MDF file to devExpress grid control. MY data base has 2 columns: Name and ID only. Please help me.

Create a table adapter that does a basic 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). Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM