public Dictionary<string, SummaryItemType> GetAllColumnSummaryInGridView(GridView gridview)
{
Dictionary<string, SummaryItemType> result = new Dictionary<string, SummaryItemType>();
foreach (GridColumn column in gridview.VisibleColumns)
{
if (column.FieldName != "DX$CheckboxSelectorColumn")
{
if (gridview.Columns[column.FieldName].Summary != null)
{
if (gridview.Columns[column.FieldName].Summary.Count > 0)
{
var data = gridView1.Columns[column.FieldName].Summary.AsEnumerable();
var field_name = (from t in data
select t.FieldName).FirstOrDefault();
var summary_type = (from t in data
select t.SummaryType).FirstOrDefault();
result.Add(field_name, summary_type);
}
}
}
}
return result;
}