예제 #1
0
 protected override void OnViewChange()
 {
     base.OnViewChange();
     _inLabelEdit = false;
     availableFieldsTreeColumns.RootColumn = ViewInfo.ParentColumn;
     availableFieldsTreeColumns.ShowAdvancedFields = ViewEditor.ShowHiddenFields;
     availableFieldsTreeColumns.SublistId = ViewInfo.SublistId;
     availableFieldsTreeColumns.CheckedColumns = ListColumnsInView();
     ListViewHelper.ReplaceItems(listViewColumns,
         VisibleColumns.Select(MakeListViewColumnItem).ToArray());
     if (null != SelectedPaths)
     {
         var selectedIndexes = VisibleColumns
             .Select((col, index) => new KeyValuePair<DisplayColumn, int>(col, index))
             .Where(kvp => SelectedPaths.Contains(kvp.Key.PropertyPath))
             .Select(kvp => kvp.Value);
         ListViewHelper.SelectIndexes(listViewColumns, selectedIndexes);
     }
     UpdateButtons();
 }
예제 #2
0
 public void ActivateColumn(int index)
 {
     ListViewHelper.SelectIndex(listViewColumns, index);
     ActivatePropertyPath(VisibleColumns[index].PropertyPath);
 }