php - Couple newbie questions regarding the openJS grid -
i playing openjs grid. being through videos, still stuck. using latest openjs grid 2.1.5. couple questions here:
when used basic setup example, save , delete set true, don't see either 1 show in grid. missing?
how change theme? example have white background theme. want change similar video tutorial dark color theme. how do that?
how select rows, highlight column? click column, sorting. click cell, won't select row nor put on top shown in video.
thanks,
wei,
the html file
<!doctype html> <html lang="en"> <head> <link rel="stylesheet" href="../bootstrap/css/bootstrap.css"/> <link rel="stylesheet" href="../grid.css" title="openjsgrid"/> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"/> <script src="../jquery.js" type="text/javascript"></script> <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"> </script> <script src="../root.js"></script> <script src="../grid.js"></script> <script type="text/javascript"> $(function() { $(".purchases").grid(); }); </script> </head> <body> <h2>insider purphases</h2> <table class="grid purchases" action="insider.php"> <tr> <th col="insider">insider name</th> <th col="company">company</th> <th col="symbol">symbol</th> <th col="amount">amount</th> <th col="relationship">relationship</th> <th col="date">date</th> </tr> </table> </body> </html> the php file
<?php // connect db mysql_connect("localhost","root",""); mysql_select_db("insidertrades"); // require our class require_once("../grid.php"); // load our grid table $grid = new grid("purchases", array( "save"=>true, "delete"=>true )); ?>
ok, @ least turned editing flag in javascript bring "save" button make sense.
<script type="text/javascript"> $(function() { $(".purchases").grid({ editing:true }); }); </script>
Comments
Post a Comment