Example #1
0
        private IEnumerable <SelectableColumn> GetSelectableColumnsFor(string thisType)
        {
            var keyPrefix   = "";
            var labelPrefix = "";

            if (SelectedLink != null && SelectedLink.Key.Contains("|"))
            {
                keyPrefix   = SelectedLink.Key + ".";
                labelPrefix = SelectedLink.Value + " > ";
            }
            return(RecordService
                   .GetFields(thisType)
                   .Select(f => new SelectableColumn(keyPrefix + f, labelPrefix + RecordService.GetFieldLabel(f, thisType), 200, RemoveCurrentField, AddCurrentField, ApplicationController))
                   .Where(sc => !CurrentColumns.Any(c => c.FieldName == sc.FieldName))
                   .OrderBy(sc => sc.FieldLabel)
                   .ToArray());
        }
Example #2
0
 public void RefreshIsFirstColumn()
 {
     if (CurrentColumns != null)
     {
         foreach (var column in CurrentColumns.ToArray().Skip(1))
         {
             if (column.IsFirstColumn)
             {
                 column.IsFirstColumn = false;
             }
         }
         if (CurrentColumns.Any())
         {
             CurrentColumns.First().IsFirstColumn = true;
         }
     }
 }