Class \Prado\Web\UI\ActiveControls\TActiveTableRow
TActiveTableRow is the active counterpart to the original TTableRow control and displays a table row. The table cells in the row can be accessed via \Prado\Web\UI\ActiveControls\getCells. The horizontal and vertical alignments of the row are specified via \Prado\Web\UI\ActiveControls\setHorizontalAlign and \Prado\Web\UI\ActiveControls\setVerticalAlign properties, respectively.
TActiveTableRow allows the contents of the table row to be changed during callback. When \Prado\Web\UI\ActiveControls\onRowSelected property is set, selecting (clicking on) the row will perform a callback request causing \Prado\Web\UI\ActiveControls\onRowSelected event to be fired.
It will also respond to a bubbled \Prado\Web\UI\ActiveControls\onCellSelected event of a TActiveTableCell child control and fire a \Prado\Web\UI\ActiveControls\onRowSelected event.
TActiveTableRow allows the client-side row contents to be updated during a callback response by getting a new writer, invoking the render method and flushing the output, similar to a TActivePanel control.
function callback_request($sender, $param)
{
$this->active_row->render($param->getNewWriter());
}
Please refer to the original documentation of the regular counterpart for usage.
Class hierarchy
- \Prado\Web\UI\ActiveControls\TActiveTableRow implements IActiveControl, ICallbackEventHandler
- \Prado\Web\UI\WebControls\TTableRow
- \Prado\Web\UI\WebControls\TWebControl implements IStyleable
- \Prado\Web\UI\TControl implements IRenderable, IBindable
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 3.1.9
public
|
|
public
|
bubbleEvent(TControl $sender, TEventParameter $param) : bool
This method overrides parent's implementation and raises the control's
callback event. This will fire the {@see onRowSelected OnRowSelected}
event if an appropriate event handler is implemented.
|
public
|
|
public
|
|
public
|
getRowIndex() : int
Returns the zero-based index of the TActiveTableRow within the {@see \Prado\Web\UI\WebControls\TTableRowCollection}
of the parent {@see \Prado\Web\UI\WebControls\TTable} control. Raises a {@see \Prado\Exceptions\TConfigurationException} if the row
is no member of the row collection.
|
public
|
|
public
|
onRowSelected(TActiveTableRowEventParameter $param) : mixed
This method is invoked when a callback is requested. The method raises
'OnRowSelected' event to fire up the event handlers. If you override this
method, be sure to call the parent implementation so that the event
handler can be invoked.
|
public
|
raiseCallbackEvent(TCallbackEventParameter $param) : mixed
Raises the callback event. This method is required by {@see \Prado\Web\UI\ActiveControls\ICallbackEventHandler}
interface. It will raise {@see onRowSelected OnRowSelected} event with a
{@see \Prado\Web\UI\ActiveControls\TActiveTableRowEventParameter} containing the zero-based index of the
TActiveTableRow.
This method is mainly used by framework and control developers. |
public
|
render(THtmlWriter $writer) : mixed
Renders and replaces the row's content on the client-side. When render() is
called before the OnPreRender event, such as when render() is called during
a callback event handler, the rendering is defered until OnPreRender event
is raised.
|
protected
|
addAttributesToRender(THtmlWriter $writer) : mixed
Ensure that the ID attribute is rendered and registers the javascript code
for initializing the active control if the event handler for the
{@see onRowSelected OnRowSelected} event is set.
|
protected
|
|
protected
|
getPostBackOptions() : array<string|int, mixed>
Returns postback specifications for the table row.
This method is used by framework and control developers. |