private static ButtonRenderMode ConvertToRenderMode(GridViewCommandButtonType buttonType) { switch (buttonType) { case GridViewCommandButtonType.Image: case GridViewCommandButtonType.Link: return(ButtonRenderMode.Link); default: return(ButtonRenderMode.Button); } }
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; }
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 GetToolTipText(ASPxSmartGridViewECCommandButtonSettings buttonSettings, GridViewCommandButtonType buttonType, string defaultToolTip) { switch (buttonType) { case GridViewCommandButtonType.Image: return GetValueOrDefault(buttonSettings.Text, defaultToolTip); default: return string.Empty; } }
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 ButtonRenderMode ConvertToRenderMode(GridViewCommandButtonType buttonType) { switch (buttonType) { case GridViewCommandButtonType.Image: case GridViewCommandButtonType.Link: return ButtonRenderMode.Link; default: return ButtonRenderMode.Button; } }
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; }
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 GetToolTipText(ASPxSmartGridViewECCommandButtonSettings buttonSettings, GridViewCommandButtonType buttonType, string defaultToolTip) { switch (buttonType) { case GridViewCommandButtonType.Image: return(GetValueOrDefault(buttonSettings.Text, defaultToolTip)); default: return(string.Empty); } }
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 GridViewCommandButtonType GetButtonType(ASPxSmartGridViewECCommandButtonSettings buttonSettings, GridViewCommandButtonType columnButtonType) { if (buttonSettings.ButtonType != GridViewCommandButtonType.Default) { return(buttonSettings.ButtonType); } if (columnButtonType != GridViewCommandButtonType.Default) { return(columnButtonType); } return(GridViewCommandButtonType.Link); }