1
Reply

datatable datakeys

Debopriyo Dey

Debopriyo Dey

Aug 16 2017 4:06 AM
141

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)