Dinesh Santhalingam

Dinesh Santhalingam

  • NA
  • 737
  • 368.6k

How to load Arraylist

Jan 5 2017 12:46 AM
Here I load array from data table to array list
  1. public static ArrayList LoadView()  
  2. {  
  3. DataTable dt = new DataTable();  
  4. DataView view = new DataView(dt);  
  5. view.RowFilter = (("Name='AD'"));  
  6. DataTable dtcopy = view.ToTable("Selected", false, "Row1", "Row2");  
  7. var arr = dtcopy.Rows.Cast<DataRow>().Select(r => r.ItemArray).ToArray();  
  8. ItemList.Add(arr1);  
  9.    
  10. DataView view2 = new DataView(dt);  
  11. view2.RowFilter = (("Name='ProE'"));  
  12. DataTable dtcopy2 = view2.ToTable("Selected", false, "Row1", "Row2");  
  13. // remove some column from datatable  
  14. var arr2 = dtcopy2.Rows.Cast<DataRow>().Select(r => r.ItemArray).ToArray();//Convert datatable to array  
  15. //return arr2;  
  16. ItemList.Add(arr2);  
  17.    
  18. return Itemlist;   
  19. }  
Here i have two arrays in my array list.Now i want to append it in a particular array in javascript
 
  1. Javascript:  
  2. PageMethods.LoadView();  
  3. function LoadSucc(obj,obj1)//Retur arraylist  
  4. {  
  5. var goog = [];  
  6. goog = obj;  
  7.    
  8. var goog1 = [];  
  9. goog1 = obj1;  
  10.  }  
Hope you undestand my problem .Suggest me some ideas to solve my issue
 

Answers (1)