프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$afterToggle | a javascript function that will be invoked after the toggle ajax call.
The function signature is function(data)
array( class'=>'TbToggleColumn', 'afterToggle'=>'function(success,data){ if (success) alert("Toggled successfuly"); }', ), |
||
$checkedButtonLabel | the label for the toggle button. Defaults to "Check". Note that the label will not be HTML-encoded when rendering. | ||
$checkedIcon | the glyph icon toggle button "checked" state. You may set this property to be false to render a text link instead. | ||
$displayText | display button with text or only icon with label tooltip | ||
$emptyButtonLabel | the label for the NULL value toggle button. Defaults to "Not Set". Note that the label will not be HTML-encoded when rendering. | ||
$emptyIcon | the glyph icon toggle button "empty" state (example for null value) | ||
$filter | the HTML code representing a filter input (eg a text field, a dropdown list) that is used for this data column. This property is effective only when {@link CGridView::filter} is set. If this property is not set, a text field will be generated as the filter input; If this property is an array, a dropdown list will be generated that uses this property value as the list options. If you don't want a filter for this data column, set this value to false. | ||
$footerHtmlOptions | the HTML options for the footer cell tag. | ||
$headerHtmlOptions | the HTML options for the header cell tag. | ||
$htmlOptions | the HTML options for the data cell tags. | ||
$name | the attribute name of the data model. Used for column sorting, filtering and to render the corresponding attribute value in each data cell. If {@link value} is specified it will be used to rendered the data cell instead of the attribute value. | ||
$sortable | whether the column is sortable. If so, the header cell will contain a link that may trigger the sorting. Defaults to true. Note that if {@link name} is not set, or if {@link name} is not allowed by {@link CSort}, this property will be treated as false. | ||
$toggleAction | Name of the action to call and toggle values | ||
$uncheckedButtonLabel | the label for the toggle button. Defaults to "Uncheck". Note that the label will not be HTML-encoded when rendering. | ||
$uncheckedIcon | the glyph icon toggle button "unchecked" state. You may set this property to be false to render a text link instead. | ||
$uniqueClassSuffix | suffix substituted to a name class of the tag |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$toggleOptions | the configuration for toggle button. |
메소드 | 설명 | |
---|---|---|
init ( ) | Initializes the column. |
메소드 | 설명 | |
---|---|---|
initButton ( ) | Initializes the default buttons (toggle). | |
registerClientScript ( ) | Registers the client scripts for the button column. | |
renderDataCellContent ( integer $row, mixed $data ) | Renders the data cell content. |
메소드 | 설명 | |
---|---|---|
getButtonLabel ( $value ) : string | Returns the button label |
protected registerClientScript ( ) |
protected renderDataCellContent ( integer $row, mixed $data ) | ||
$row | integer | the row number (zero-based) |
$data | mixed | the data associated with the row |
function(data)
success
status of the ajax call, true if the ajax call was successful, false if the ajax call failed.
data
the data returned by the server in case of a successful call or XHR object in case of error.
array( class'=>'TbToggleColumn', 'afterToggle'=>'function(success,data){ if (success) alert("Toggled successfuly"); }', ),
public $afterToggle |
public $checkedButtonLabel |
public $checkedIcon |
public $displayText |
public $emptyButtonLabel |
public $emptyIcon |
public $filter |
public $name |
public $sortable |
public $uncheckedButtonLabel |
public $uncheckedIcon |