Examples

ExtraCols

Here you may test different extra columns configuration to understand its behavior. Also you may verify how to add options in the actions select box.

Because we add new columns and we want to perform some actions when we click the EDIT or DELETE button, or when we choose an action, we included a javascript to handle this functions

<script type="text/javascript" src="js/my_javascript.js"></script>

$arr_extra_cols[0] = array(1,'<input type="checkbox" id="ct_check_all" name="ct_check_all" onclick="checkAll();" />','20','<input type="checkbox" id="ct_check" name="ct_check[]" value="#COL2#" onclick="check();" />');  // column, header, width, html
$arr_extra_cols[1] = array(6,'Actions','45','<a href="javascript: funcEdit(\'#ID#...#COL5#\');"><img src="images/icon-edit.gif" /></a><a href="javascript: funcDelete(\'#ID#...#COL5#\');"><img src="images/icon-delete.gif" /></a>');  // column, header, width, html
$params['extra_cols'] = $arr_extra_cols;  

$arr_actions[0] = array('','-- Actions --');  // value, text
$arr_actions[1] = array('publish','Publish');  // value, text
$arr_actions[2] = array('duplicate','Duplicate');  // value, text
$arr_actions[3] = array('delete','Delete');  // value, text
$params['actions'] = $arr_actions;  

$params['actions_url'] = 'ctActions(\'#ID#\')';  // javascript code triggered when actions change - default
$params['actions_url'] = 'alert(\'Actions changed\')';  // javascript code triggered when actions change

IMDb Top 250

Search...
RankRatingTitleVotesActions
19.1The Shawshank Redemption (1994)489048
29.1The Godfather (1972)392126
39.0The Godfather: Part II (1974)232161
48.9Il buono, il brutto, il cattivo. (1966)148969
58.9Pulp Fiction (1994)396749
68.8Schindler's List (1993)262551
78.812 Angry Men (1957)109861
88.8One Flew Over the Cuckoo's Nest (1975)202689
98.8Star Wars: Episode V - The Empire Strikes Back (1980)265556
108.8The Dark Knight (2008)436120
Total: 250Page: 1 of 25