private void ApplyColumnAnnotationSettings(IGridColumn <T> column, GridColumnAttribute options) { column.Encoded(options.EncodeEnabled) .Sanitized(options.SanitizeEnabled) .Filterable(options.FilterEnabled) .Sortable(options.SortEnabled); column.SetPrimaryKey(options.Key); GridSortDirection?initialDirection = options.GetInitialSortDirection(); if (initialDirection.HasValue) { column.SortInitialDirection(initialDirection.Value); } if (!string.IsNullOrEmpty(options.FilterWidgetType)) { column.SetFilterWidgetType(options.FilterWidgetType); } if (!string.IsNullOrEmpty(options.Format)) { column.Format(options.Format); } if (!string.IsNullOrEmpty(options.Title)) { column.Titled(options.Title); } if (!string.IsNullOrEmpty(options.Width)) { column.Width = options.Width; } }