Example #1
0
        private static string GetToolTipText(ASPxSmartGridViewECCommandButtonSettings buttonSettings, GridViewCommandButtonType buttonType, string defaultToolTip)
        {
            switch (buttonType)
            {
            case GridViewCommandButtonType.Image:
                return(GetValueOrDefault(buttonSettings.Text, defaultToolTip));

            default:
                return(string.Empty);
            }
        }
Example #2
0
        private static void SetImageSettings(ASPxButton button, ASPxSmartGridViewECCommandButtonSettings buttonSettings, GridViewCommandButtonType buttonType)
        {
            switch (buttonType)
            {
            case GridViewCommandButtonType.Link:
                break;

            default:
                button.Image.CopyFrom(buttonSettings.Image);
                break;
            }
        }
Example #3
0
        private static string GetButtonText(ASPxSmartGridViewECCommandButtonSettings buttonSettings, GridViewCommandButtonType buttonType, string defaultText)
        {
            var buttonText = GetValueOrDefault(buttonSettings.Text, defaultText);

            switch (buttonType)
            {
            case GridViewCommandButtonType.Image:
                return(buttonSettings.Image.IsEmpty ? buttonText : string.Empty);

            default:
                return(buttonText);
            }
        }
Example #4
0
        private static GridViewCommandButtonType GetButtonType(ASPxSmartGridViewECCommandButtonSettings buttonSettings, GridViewCommandButtonType columnButtonType)
        {
            if (buttonSettings.ButtonType != GridViewCommandButtonType.Default)
            {
                return(buttonSettings.ButtonType);
            }

            if (columnButtonType != GridViewCommandButtonType.Default)
            {
                return(columnButtonType);
            }

            return(GridViewCommandButtonType.Link);
        }