|116196||Apr 23,2014 05:01 AM||May 2,2014 09:12 AM||WinRT||1|
I need to populate the grid with the data in the database. Since the grid is bound to a item source I am unable to perform a proper retrieval.
Following is the code that I Tried:
"mat.cs" is the file which is bound to the grid.
var dbpath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "Test2.db");
using (var db = new SQLite.SQLiteConnection(dbpath))
foreach (ExpandoObject ep in (this.DataContext as mat).DynamicOrder)
//db = new SQLite.SQLiteConnection(dbpath);
dynamic epObj = ep;
var line = string.Empty;
line = epObj.Name;
Material conobj = new Material();
conobj.Name = epObj.Name;
conobj.Type = epObj.Type;
conobj.Quantity = epObj.Quantity;
List<Material> lstMats = db.Table<Material>().ToList();
//var bline = new MessageDialog("Data Inserted");
Thank you for using Syncfusion Products.
We have created a sample to achieve your requirement to retrieve data from database and setting this data to the ItemSource of grid.
You can find the sample under the following location:
Please let us know if this solution helps you.
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.