PHPGRID_DBTYPE, "server" => PHPGRID_DBHOST, "user" => PHPGRID_DBUSER, "password" => PHPGRID_DBPASS, "database" => PHPGRID_DBNAME); # create contacts grid $g = new jqgrid($db_conf); #Set table specific options $opt = array(); $opt['caption']= "Contacts Grid"; #$opt['responsive'] = true; NOT WORKING SJH 7/28/17 #$opt['shrinkToFit']= true; NOT WORKING SJH 7/28/17 $opt['autowidth']= true; $opt['autoresize']= true; #THIS IS THE RESPONSIVE OPTION!! #Set the client side event handler option $opt["onSelectRow"]="function(id){do_onselect(id);}"; $g->set_options($opt); $g->table = "tblContacts"; #Set column specific options $col=array(); $col["title"] ="Id"; $col["name"] ="ID"; $col["width"]="10"; $col["editable"]=false; $col["visible"]="sm+"; $col["resizable"] = true; $cols[]=$col; $col=array(); $col["title"] ="First Name"; $col["name"] ="First Name"; $col["width"]="20"; $col["editable"]=false; $col["visible"]="sm+"; $cols[]=$col; $col=array(); $col["title"] ="Last Name"; $col["name"] ='Last Name'; $col["width"]="20"; $col["editable"]=false; $col["visible"]="sm+"; $cols[]=$col; $col=array(); $col["title"] ="PO Box"; $col["name"] ='con_pobox'; $col["width"]="20"; $col["editable"]=false; $col["visible"]="sm+"; $cols[]=$col; $col=array(); $col["title"] ="Address"; $col["name"] ="con_address"; $col["width"]="30"; $col["editable"]=false; $col["visible"]="sm+"; $cols[]=$col; $col=array(); $col["title"] ="City"; $col["name"] ="con_city"; $col["width"]="20"; $col["editable"]=false; $col["visible"]="sm+"; $cols[]=$col; $col=array(); $col["title"] ="State"; $col["name"] ='con_state'; $col["width"]="10"; $col["editable"]=false; $col["visible"]="sm+"; $cols[]=$col; $col=array(); $col["title"] ="Zip"; $col["name"] ='con_zip'; $col["width"]="10"; $col["editable"]=false; $col["visible"]="sm+"; $cols[]=$col; $col=array(); $col["title"] ="Building Name"; $col["name"] ="building_name"; $col["width"]="20"; $col["editable"]=false; $col["visible"]="sm+"; $cols[]=$col; $col=array(); $col["title"] ="Building Id"; $col["name"] ="building_id"; $col["width"]="10"; $col["editable"]=false; $col["visible"]="sm+"; $cols[]=$col; $col=array(); $col["title"] ="Company"; $col["name"] ="company"; $col["width"]="20"; $col["editable"]=false; $col["visible"]="sm+"; $cols[]=$col; $col=array(); $col["title"] ="Decision Maker"; $col["name"] ="decision_maker"; $col["width"]="10"; $col["editable"]=false; $col["visible"]="sm+"; $cols[]=$col; $col=array(); $col["title"] ="Email"; $col["name"] ="E-mail Address"; $col["width"]="20"; $col["editable"]=false; $col["visible"]="sm+"; $cols[]=$col; $col=array(); $col["title"] ="Business Phone"; $col["name"] ="Business Phone"; $col["width"]="20"; $col["editable"]=false; $col["visible"]="sm+"; $cols[]=$col; /*$col=array(); $col["title"] ="BusExt"; $col["name"] ='Extension'; $col["width"]="10"; $col["editable"]=false; $col["visible"]="sm+"; $cols[]=$col;*/ /*$col=array(); $col["title"] ="Fax"; $col["name"] ="fax"; $col["width"]="10"; $col["editable"]=false; $col["visible"]="sm+"; $cols[]=$col;*/ $col=array(); $col["title"] ="Company"; $col["name"] ="company"; $col["width"]="20"; $col["editable"]=false; $col["visible"]="sm+"; $cols[]=$col; $col=array(); $col["title"] ="Email Contact"; $col["name"] ='it_email_cont'; $col["width"]="10"; $col["editable"]=false; $col["visible"]="sm+"; $cols[]=$col; /*$col=array(); $col["title"] ="Mobile Phone"; $col["name"] ='Mobile Phone'; $col["width"]="20"; $col["editable"]=false; $col["visible"]="sm+"; $cols[]=$col;*/ $col=array(); $col["title"] ="SD User Id"; $col["name"] ="StarDoc_User_id"; $col["width"]="10"; $col["editable"]=false; $col["visible"]="sm+"; $col["resizable"] = true; $cols[]=$col; #Set the cols as the options were specified $g->set_columns($cols); // you can provide custom SQL query to display data //$g->select_command = 'SELECT id, building_name, building_id, "Last Name", "First Name", con_address, // con_pobox, con_state, con_city, con_zip, "E-mail Address", "Business Phone", company, it_email_cont FROM tblContacts'; #"SELECT * FROM contact_types"; $out=$g->render("list1"); }#end if ?>