Guest User

PHPGRID.ORG

a guest
Feb 13th, 2015
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.68 KB | None | 0 0
  1.         $g = new jqgrid();
  2.  
  3.         // file upload column
  4.         $col = array();
  5.         $col["title"] = "Image";
  6.         $col["name"] = "news_image";
  7.         $col["editable"] = true;
  8.  
  9.         $col["edittype"] = "file"; // render as file
  10.         $col["upload_dir"] = "uploads/news_images"; // upload here
  11.  
  12.         $col["show"] = array("list"=>false,"edit"=>true,"add"=>true); // only show in add/edit dialog
  13.         $cols[] = $col;
  14.  
  15.  
  16.         $col = array();
  17.         $col["title"] = "Image Preview";
  18.         $col["name"] = "image";
  19.  
  20.         $col["formatter"] = "image";
  21.         $col["formatoptions"] = array("class"=>'img_preview');
  22.         $col["search"] = false;
  23.  
  24.         $col["show"] = array("list"=>true,"edit"=>true,"add"=>false); // only show in Grid
  25.         $cols[] = $col;
Advertisement
Add Comment
Please, Sign In to add comment