DataView (DataSet)

System.Data.DataView _DataView = new System.Data.DataView(_DataSet.Tables[0]); _DataView.Sort = "Order ASC"; foreach (System.Data.DataRowView _DataRowView in _DataView) { switch (_DataRowView[1].ToString()) { } } //DISTINCT System.Data.DataView _DataView = new System.Data.DataView(_DataSet.Tables["TableName"]); System.Data.DataTable _DataTable = _DataView.ToTable(true, "Column"); foreach (System.Data.DataRow _DataRow in _DataTable.Rows) { } // End: foreach //SUM object _sumObject; _sumObject = table.Compute("Sum(Total)", "EmpID = 5");

Von |2015-06-13T22:52:24+00:00Juni 12th, 2015|Kommentare deaktiviert für DataView (DataSet)