Advertisement
Guest User

Untitled

a guest
Dec 10th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. public void search()
  2. {
  3.  
  4. try
  5. {
  6.  
  7. DataTable _searchResult = ddy.Select("[PRODUCT NO] LIKE '" + metroTextBox2.Text + "%'").CopyToDataTable();
  8.  
  9. if (metroGrid2.InvokeRequired)
  10. {
  11. metroGrid2.BeginInvoke((MethodInvoker)delegate()
  12. {
  13. metroGrid2.DataSource = _searchResult;
  14.  
  15. metroGrid2.Columns[0].Width = 180;
  16. metroGrid2.Columns[1].Width = 300;
  17. metroGrid2.Columns[1].Width = 280;
  18. metroGrid2.Show();
  19. });
  20.  
  21. Thread.Sleep(100);
  22. }
  23. }
  24. catch (Exception )
  25. {
  26.  
  27. }
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement