c# - How to loop through a DataGrid and get the column values with column header? -


Here is an example of how to obtain column based row values ​​in an Observe Collection "Order Collection":

  double order SUBTotal = (double) 0; Foreign Currency (Various Data in Order Order Collection) {Order Order Data = (Order) Data; //MessageBox.Show (orderData.Product.SalesPrice.ToString ()); OrderSwashot = OrderData Products. SellPrices; } This.OrderSum + = OrderSubTotal;  

 for  (int i = 0; i & lt; datagrid Items calculation; i ++) {DataGridRow line = (DataGridRow) dataGrid.ItemContainerGenerator.ContainerFromIndex (i); (If the grid column. Header == "some") {// something}}  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -