ToolbarButton Constructor | |
Global constructor for Toolbar button use it to Header Toolbar List and data item list
Namespace:
SOWIWeb.Helper
Assembly:
SOWIWeb.Helper (in SOWIWeb.Helper.dll) Version: 19.1.23.1 (19.1.23.622)
Syntax public ToolbarButton(
ButtonType pType,
string pIcon = "",
string pLabel = "",
bool pDefault = false,
string pSubmitValue = "",
string pEventHandler = "",
string pEventCommand = "",
string pMVCController = "",
string pMVCAction = "",
string pToggleTarget = "",
ToggleType pToggleType = ToggleType.none,
bool pDisabled = false,
string pStyle = "",
string pTooltipText = "",
DataPlacements pTooltipPlacement = DataPlacements.bottom
)
Public Sub New (
pType As ButtonType,
Optional pIcon As String = "",
Optional pLabel As String = "",
Optional pDefault As Boolean = false,
Optional pSubmitValue As String = "",
Optional pEventHandler As String = "",
Optional pEventCommand As String = "",
Optional pMVCController As String = "",
Optional pMVCAction As String = "",
Optional pToggleTarget As String = "",
Optional pToggleType As ToggleType = ToggleType.none,
Optional pDisabled As Boolean = false,
Optional pStyle As String = "",
Optional pTooltipText As String = "",
Optional pTooltipPlacement As DataPlacements = DataPlacements.bottom
)
Parameters
- pType
- Type: SOWIWeb.HelperButtonType
Button Type - pIcon (Optional)
- Type: SystemString
icon for user interface e.g. glyphicon glyphicon-pencil - pLabel (Optional)
- Type: SystemString
label for user interface - pDefault (Optional)
- Type: SystemBoolean
when is true then is this the default button equal press enter key - pSubmitValue (Optional)
- Type: SystemString
use it by Button Type Submit - submit value e.g. save. or MVC value e.g. /User/Edit/3 - pEventHandler (Optional)
- Type: SystemString
use it by Button Type Event and Toggle - e.g. onclick - pEventCommand (Optional)
- Type: SystemString
use it by Button Type Event and Toggle - e.g. window.print() - pMVCController (Optional)
- Type: SystemString
use it by Button Type Action - controller name e.g. Ticket - pMVCAction (Optional)
- Type: SystemString
use it by Button Type Action - action name e.g. Edit - pToggleTarget (Optional)
- Type: SystemString
use it by Button Type Toggle - id of HTML div from panel or dialog - pToggleType (Optional)
- Type: SOWIWeb.HelperToggleType
use it by Button Type Toggle - e.g. collapse is a panel that collapse or expand - pDisabled (Optional)
- Type: SystemBoolean
deactivated button (default false) - pStyle (Optional)
- Type: SystemString
overwrite standard class style - pTooltipText (Optional)
- Type: SystemString
help text use on toolbar button object tooltip - pTooltipPlacement (Optional)
- Type: SOWIWeb.HelperDataPlacements
tooltip placement (default bottom)
Remarks Button Type | Description |
---|
Action | Button type call MVC action |
Submit | Button type call form command |
Event | Button type call event e.g. onclick with code window.print() |
HRef | Not supported at the moment |
Toggle | Button type of panel or dialog toggle and supported event handler (see Button Type Event).
Note to event commands by button type Toggle: not use command alert because then toggle doesn't works |
HTML syntax code example by Button Type Action
href="@Url.Action(Action, Controller, Value)"
See Also