Debopriyo Dey

Debopriyo Dey

  • NA
  • 51
  • 15.9k

datatable datakeys

Aug 16 2017 4:06 AM

if (chkAll.Checked)

{

   if (!array.Contains(gridview.DataKeys[i].Value))

   {

      array.Add(gridview.DataKeys[i].Value);

   }

}

 
This is to  add the row of a gridview to the ARRAY if the checkbox is checked.
 
What will be the code if I work with DATATABLE instead of GRIDVIEW. 

Answers (1)