假如某行是 Xm_struct x = this.Brow.SelectedItem as Xm_struct;则下面分别是第5和第七列的对象 TextBlock Ddjs = this.Brow.Columns[4].GetCellContent(x) as TextBlock; TextBlock Dj = this.Brow.Columns[6].GetCellContent(x) as TextBlock;
function getCol(){ var rows = $("#dg").datagrid("getRows"); var total = ""; for(var i=0; i<rows.length; i++){ total = total + rows[i]["field"]; } return total; }