/** * Our CreatePerson function, used as the callback in our paginator */ function CreatePerson() { //The data for each row of data is stored in Event::$BoundData $person = Event::$BoundData; $name = new Label($person['firstname'] . ' ' . $person['lastname']); //Style the $name, making it a bit prettier $name->SetSize('100%', null); $name->CSSBorderBottom = '1px dotted black'; $name->CSSPadding = '5px'; //Set Label's Layout to Relative $name->Layout = Layout::Relative; //Set a Click for each $name $name->Click = new ServerEvent('System', 'Alert', "person_id for {$name->Text} is {$person['person_id']}."); /*We must return an object for each callback. Paginator will automatically add this object to your results panel. You can return ANY object that extends Control*/ return $name; }