Nebula

Nebula

  • NA
  • 36
  • 25.4k

Search value with datatable select in specific row range

May 6 2019 10:41 PM
Hi, I am trying to get value from specific row range.
 
This is the code i tried but not sure where should i use the variable rows.
  1. var rows = dt.AsEnumerable().Skip(0).Take(15);  
  2. string value = "CB123";  
  3. DataRow[] result = dt.Select("BOOKCODE like '%" + value + "%'");  
  4. //foreach (var col in rows)  
  5. //{  
  6. if (result.Count() > 0)  
  7. {  
  8.     MessageBox.Show("BookCode Not Found");  
  9.     //Application.Exit();  
  10. }  
  11. //}  

Answers (8)