webismymind / editablegrid

EditableGrid is an open source Javascript library aimed at turning HTML tables into advanced editable components. It focuses on simplicity: only a few lines of code are required to get your first table up and running.
http://www.editablegrid.net
Other
795 stars 272 forks source link

Problem with number of column #81

Closed XinYiMan closed 7 years ago

XinYiMan commented 9 years ago

Hello guys, I have a problem. I created a table connected to the database, and it all works. The problem is that I visiona only 9 columns, if they do not put more displays. How do I fix?

My code [code] <?php

/*

/**

require_once('config.php');
require_once('EditableGrid.php');
require_once('../../Sessioni.php');
require_once('../../Classi/Lingue.php');

/**

//mi serve per usare le sessioni InizializzaSessione(); //mi serve per usare le traduzioni $app=new Lingue($Stringa_Connessione,$NomeUtente,$Password);

// create a new EditableGrid object $grid = new EditableGrid(); $db_tablename = (isset($_GET['db_tablename'])) ? $_GET['db_tablename'] : 'T_UTENTI';

$connection = new PDO($str_conn,$config['db_user'],$config['db_password']);
/* 
*  Add columns. The first argument of addColumn is the name of the field in the databse. 
*  The second argument is the label that will be displayed in the header
*/

$grid->addColumn('ID', $app->GetTraduzione('IT','GRID_UTENTI_ID'), 'integer', NULL, false);     
$grid->addColumn('NOME', $app->GetTraduzione('IT','GRID_UTENTI_USER'), 'string');  
$grid->addColumn('PWD', $app->GetTraduzione('IT','GRID_UTENTI_PWD'), 'string');  
$grid->addColumn('ABILITATO', $app->GetTraduzione('IT','GRID_UTENTI_ABILITATO'), 'string',fetch_pairs($connection,'select PAROLA, TRADUZIONE from T_LINGUE WHERE (Parola=\'T\' or Parola=\'F\') AND Lingua=\'' . GetSessione("LinguaUtente") . '\''),true);  
$grid->addColumn('COGNOME_UTENTE', $app->GetTraduzione('IT','GRID_UTENTI_COGNOME'), 'string');  
$grid->addColumn('NOME_UTENTE', $app->GetTraduzione('IT','GRID_UTENTI_NOME'), 'string');    
$grid->addColumn('LINGUA', $app->GetTraduzione('IT','GRID_UTENTI_LINGUA'), 'string' , fetch_pairs($connection,'select LINGUA,DESCRIZIONE from T_LINGUE_LISTA ORDER BY Descrizione ASC'),true);
$grid->addColumn('LIVELLO', $app->GetTraduzione('IT','GRID_UTENTI_LIVELLO'), 'integer' , fetch_pairs($connection,'select ID, DESCRIZIONE from T_UTENTI_LIVELLI WHERE ID>=0 ORDER BY ID'),true);     

$grid->addColumn('PATH_DB', $app->GetTraduzione('IT','GRID_UTENTI_PATH_DB'), 'string',NULL, true);
$grid->addColumn('IMG', $app->GetTraduzione('IT','GRID_UTENTI_AVATAR'), 'string', NULL, true);
$grid->addColumn('action', $app->GetTraduzione('IT','GRID_UTENTI_AZIONE'), 'html', NULL, false, 'ID');

$app=$connection->prepare('SELECT * FROM ' . $db_tablename . ' WHERE ID_UTENTE_AMMINISTRATORE=-1');
$app->execute();

$result = $app->fetchAll();

$connection = null;

// send data to the browser $grid->renderXML($result); [/code]