public static IEnumerable <GridViewColumn> VisibleColumns(this ASPxGridView source) { var visibleColumns = source.Columns().Where(x => x.Visible); if (source.Settings.ShowGroupedColumns == false) { visibleColumns = visibleColumns.Where(x => x.NotGrouped()); } return(visibleColumns.OrderBy(x => x.VisibleIndex)); }
public static GridViewDataColumn ColumnOf(this ASPxGridView source, string fieldName) { return(source.Columns <GridViewDataColumn>().Where(x => x.FieldName == fieldName).FirstOrDefault()); }