Last active
October 12, 2015 06:58
-
-
Save optikalefx/3988073 to your computer and use it in GitHub Desktop.
Open JS Grid Linking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// require our class | |
require_once("grid.php"); | |
// load our grid with a table | |
$grid = new Grid("tutorials", array( | |
"joins"=>array( | |
"LEFT JOIN categories ON categories.CategoryID = tutorials.CategoryID" | |
), | |
"fields"=>array( | |
"thumb" => "CONCAT('http://cmivfx.com/images/thumbs/',ThumbnailLocation)", | |
"category"=>"categories.Name", | |
"price"=>"tutorials.Price" | |
) | |
)); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
$(function(){ | |
$(".demo3").grid({ | |
editing: true | |
}) | |
}); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table title="linking" class="demo demo3" action="ajax2.php"> | |
<tr> | |
<th col="thumb" width="90" type="image" href="http://tny.com?q={{columns.Title}}">Image link</th> | |
<th col="DateCreated" href="http://tny.com?q={{columns.Title}}">Link other column</th> | |
<th col="Title" href="http://tny.com?q={{value}}">Link this column</th> | |
<th col="category" href="http://tny.com?q={{columns.price}}">Link other field</th> | |
</tr> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment