private static void SetImageSettings(ASPxButton button, ASPxSmartGridViewECCommandButtonSettings buttonSettings, GridViewCommandButtonType buttonType) { switch (buttonType) { case GridViewCommandButtonType.Link: break; default: button.Image.CopyFrom(buttonSettings.Image); break; } }
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; } }
private static string GetToolTipText(ASPxSmartGridViewECCommandButtonSettings buttonSettings, GridViewCommandButtonType buttonType, string defaultToolTip) { switch (buttonType) { case GridViewCommandButtonType.Image: return GetValueOrDefault(buttonSettings.Text, defaultToolTip); default: return string.Empty; } }
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; }