prabha haran

prabha haran

  • NA
  • 81
  • 32.5k

how to get values in datatable based on values in array

Apr 7 2017 2:41 AM
i have two id in array and take two row values based on array and print in grid view
 
and my code is
 
int[] iid = RawMaterialStock.temparray;


if(iid.Length>0)
{
for (int i = 0; i < iid.Length;i++ )
{
purchaseBAL.productId = iid[i];
DataTable dt = purchaseDAL.gerproductdetail(purchaseBAL);
dgvPurchaseProducts.AutoGenerateColumns = false;
dgvPurchaseProducts.DataSource = dt;
 
i am getting only one row 
insted of two
 
 

Answers (3)