Ejemplo n.º 1
0
        ///<summary>Applies this controller to a column.</summary>
        protected internal override void Apply(SmartGridColumn column)
        {
            column.OptionsColumn.ReadOnly   = true;
            column.OptionsColumn.AllowSort  = DefaultBoolean.True;
            column.OptionsColumn.AllowGroup = DefaultBoolean.True;
            column.ShowButtonMode           = ShowButtonModeEnum.ShowAlways;
            column.ShowEditorOnMouseDown    = true;
            column.AllowKeyboardActivation  = false;

            if (AppFramework.Current.CanShowDetails <Person>())
            {
                column.SetDefaultEditor(PersonEditSettings.Instance.CreateItem());
            }
            else
            {
                column.OptionsColumn.AllowEdit = false;                 //Person fields should not be edited.  Also, the default editor would show the native ToString, which is ugly.
            }
            if (column.Caption.StartsWith("Person", StringComparison.OrdinalIgnoreCase))
            {
                column.Caption = "Full Name";
            }
        }
Ejemplo n.º 2
0
 ///<summary>Applies this controller to a column.  This method should set the column's properties.</summary>
 protected internal override void Apply(SmartGridColumn column)
 {
     column.SetDefaultEditor(EditorRepository.CommentsPopupEditor.CreateItem());
 }