protected new GridViewCommandButtonSettings GetCommandButtonSettings(ColumnCommandButtonType commandItemType)
        {
            switch (commandItemType)
            {
            case ColumnCommandButtonType.Edit:
                return(Grid.ReadOnly ? Grid.SettingsCommandButton.ViewButton : Grid.SettingsCommandButton.EditButton);

            case ColumnCommandButtonType.New:
                return(Grid.SettingsCommandButton.NewButton);

            case ColumnCommandButtonType.Delete:
                return(Grid.SettingsCommandButton.DeleteButton);

            case ColumnCommandButtonType.Select:
                return(Grid.SettingsCommandButton.SelectButton);

            case ColumnCommandButtonType.Update:
                return(Grid.SettingsCommandButton.UpdateButton);

            case ColumnCommandButtonType.Cancel:
                return(Grid.SettingsCommandButton.CancelButton);

            case ColumnCommandButtonType.ClearFilter:
                return(Grid.SettingsCommandButton.ClearFilterButton);

            case ColumnCommandButtonType.ApplyFilter:
                return(Grid.SettingsCommandButton.ApplyFilterButton);

            default:
                return(null);
            }
        }
 public ASPxGridViewCommandButtonCallbackEventArgs(ColumnCommandButtonType buttonType, int visibleIndex)
 {
     ButtonType   = buttonType;
     VisibleIndex = visibleIndex;
 }
        protected new GetCommandColumnButtonClickHandlerArgs GetCommandButtonClickHandlerArgs(ColumnCommandButtonType commandItemType)
        {
            switch (commandItemType)
            {
            case ColumnCommandButtonType.New:
                return(GetAddNewRowFuncArgs);
            }

            return(base.GetCommandButtonClickHandlerArgs(commandItemType));
        }
 protected new GetCommandColumnButtonClickHandlerArgs GetCommandButtonClickHandlerArgs(ColumnCommandButtonType commandItemType)
 {
     switch (commandItemType)
     {
         case ColumnCommandButtonType.New:
             return GetAddNewRowFuncArgs;
     }
     
     return base.GetCommandButtonClickHandlerArgs(commandItemType);
 }
        protected new GridViewCommandColumnButtonControl CreateCommandButtonControl(GridViewCommandColumn column, ColumnCommandButtonType commandItemType, GridViewCommandButtonType buttonType, string text, ImageProperties image, int visibleIndex, bool postponeClick)
        {
            if (!CanCreateCommandButton(commandItemType))
            {
                return(null);
            }

            var isEditingRow = DataProxy.IsNewRowEditing && visibleIndex == -2147483647 || visibleIndex >= 0 && DataProxy.IsRowEditing(visibleIndex);

            var eventArgs = new ASPxGridViewCommandButtonEventArgs(column, commandItemType, text, image, visibleIndex, isEditingRow, buttonType);

            Grid.RaiseCommandButtonInitialize_Internal(eventArgs);

            return(eventArgs.Visible ? new GridViewCommandColumnButtonControl(eventArgs, Grid, GetCommandButtonClickHandlerArgs(commandItemType), postponeClick) : null);
        }
 protected new GridViewCommandColumnButtonControl CreateCommandButtonControl(GridViewCommandColumn column, ColumnCommandButtonType commandItemType, GridViewCommandButtonType buttonType, string text, ImageProperties image, int visibleIndex, bool postponeClick)
 {
     if (!CanCreateCommandButton(commandItemType)) return null;
     
     var isEditingRow = DataProxy.IsNewRowEditing && visibleIndex == -2147483647 || visibleIndex >= 0 && DataProxy.IsRowEditing(visibleIndex);
     
     var eventArgs = new ASPxGridViewCommandButtonEventArgs(column, commandItemType, text, image, visibleIndex, isEditingRow, buttonType);
     
     Grid.RaiseCommandButtonInitialize_Internal(eventArgs);
     
     return eventArgs.Visible ? new GridViewCommandColumnButtonControl(eventArgs, Grid, GetCommandButtonClickHandlerArgs(commandItemType), postponeClick) : null;
 }
 protected new GridViewCommandButtonSettings GetCommandButtonSettings(ColumnCommandButtonType commandItemType)
 {
     switch (commandItemType)
     {
         case ColumnCommandButtonType.Edit:
             return Grid.ReadOnly ? Grid.SettingsCommandButton.ViewButton : Grid.SettingsCommandButton.EditButton;
         case ColumnCommandButtonType.New:
             return Grid.SettingsCommandButton.NewButton;
         case ColumnCommandButtonType.Delete:
             return Grid.SettingsCommandButton.DeleteButton;
         case ColumnCommandButtonType.Select:
             return Grid.SettingsCommandButton.SelectButton;
         case ColumnCommandButtonType.Update:
             return Grid.SettingsCommandButton.UpdateButton;
         case ColumnCommandButtonType.Cancel:
             return Grid.SettingsCommandButton.CancelButton;
         case ColumnCommandButtonType.ClearFilter:
             return Grid.SettingsCommandButton.ClearFilterButton;
         case ColumnCommandButtonType.ApplyFilter:
             return Grid.SettingsCommandButton.ApplyFilterButton;
         default:
             return null;
     }
 }
 public static ASPxGridViewCommandButtonCallbackEventArgs FindLastOf(this CallbackRepository <ASPxGridViewCommandButtonCallbackEventArgs> source, ColumnCommandButtonType buttonType)
 {
     return(source.Find(x => x.ButtonType == buttonType).LastOrDefault());
 }
Exemple #9
0
 protected internal new string GetCommandButtonText(ColumnCommandButtonType buttonType)
 {
     return(base.GetCommandButtonText(buttonType));
 }
 protected internal new string GetCommandButtonText(ColumnCommandButtonType buttonType)
 {
     return base.GetCommandButtonText(buttonType);
 }
 public ASPxGridViewCommandButtonCallbackEventArgs(ColumnCommandButtonType buttonType, int visibleIndex)
 {
     ButtonType = buttonType;
     VisibleIndex = visibleIndex;
 }
 public static ASPxGridViewCommandButtonCallbackEventArgs FindLastOf(this CallbackRepository<ASPxGridViewCommandButtonCallbackEventArgs> source, ColumnCommandButtonType buttonType)
 {
     return source.Find(x => x.ButtonType == buttonType).LastOrDefault();
 }