I added this method to DataAccess.cs Class to have the ability to delete rows from my DataTable by using ObjectDataSourc e & DataGrid:
public void DeleteItems()
{
DataSet1TableAd apters.ProTable TableAdapter ProductsAdapter = new DataSet1TableAd apters.ProTable TableAdapter();
DataSet1.ProTab leRow product = new DataSet1.ProTab leRow();
ProductsAdapter .DeleteQuery(pr oduct.ProductID );
}
but the result was weired when configuring data source, All the business objects have disappeared
And how could I add DeleteQuery filters by ProductID to be related to DataGrid's Delete column..??
I followed the same instructions on this page but it was in vein
public void DeleteItems()
{
DataSet1TableAd apters.ProTable TableAdapter ProductsAdapter = new DataSet1TableAd apters.ProTable TableAdapter();
DataSet1.ProTab leRow product = new DataSet1.ProTab leRow();
ProductsAdapter .DeleteQuery(pr oduct.ProductID );
}
but the result was weired when configuring data source, All the business objects have disappeared
And how could I add DeleteQuery filters by ProductID to be related to DataGrid's Delete column..??
I followed the same instructions on this page but it was in vein
Comment