I tried to load top3 record of table into DataGrid it shows error Cannot implicitly convert type ‘System.Linq.IQueryable’ to ‘string’.The code below what i wrote
MyDatatBaseDataContext Mydb = new MyDatatBaseDataContext();
var top3 = (from t in Mydb.GetTable<student>() select t).Take(2);
grd_8.ItemStringFormat = top3;
Change
var top3 = (from t in Mydb.GetTable<student>() select t).Take(2);to
and if grd_8.ItemStringFormat is a string then you have to convert yr List to a string using StringBuilder
but You can assign the
List<student> top3to Your grid ItemsSource/DataSource