If I turn on grouping I have this error:
…ORDER BY field asc, asc LIMIT 20 OFFSET 0
can you help me?
thanks
Can you share the sample file. It's very difficult to tell with provided statements.
This seems to be a bug when no sort field and order by is not defined.
For quick fix, please add following in setting grid options.
e.g.
$grid["sortname"] = 'client_id'; // by default sort grid by this field
$grid["sortorder"] = "desc"; // ASC or DESC
I'll be updating this fix in next releaser.
here is page:
http://tempo.create.sk/skolenia/
PHP:
$g = new jqgrid();
$g->debug = TRUE;
$g->set_actions(array(
"add"=>true,
"edit"=>true,
"delete"=>true,
"rowactions"=>true,
"export"=>true,
"autofilter" => true,
"search" => "simple",
"inlineadd" => false,
"showhidecolumns" => false
)
);
$grid['caption'] ='Sample';
$grid['autowidth'] = true;
$grid['url'] = '?onlyContents=1';
$grid['editurl'] = '?onlyContents=1';
$grid['editurl'] = '?onlyContents=1';
$grid["grouping"] = true;
$grid["groupingView"] = array();
$grid["groupingView"]["groupField"] = array("ico");
$g->set_options($grid);
$g->table = "tempo__prihlaska";
$col = array();
$col['title'] = "Idečko";
$col['name'] = "id";
$col['editable'] = false;
$col['hidden'] = true;
$cols[] = $col;
$col = array();
$col['title'] = "Id kurzu";
$col['name'] = "id_kurzu";
$col['editable'] = true;
$col['hidden'] = true;
$cols[] = $col;
$col = array();
$col['title'] = "Názov kurzu";
$col['name'] = "nazov";
$col['editable'] = TRUE;
$col['link'] = $lang['webAddress'] . "c-{id_kurzu}";
$cols[] = $col;
$col = array();
$col['title'] = "Dátum konania";
$col['name'] = "datum";
$col['editable'] = TRUE;
$col['formatter'] = 'date';
$col['formatoptions'] = array("srcformat"=>'Y-m-d',"newformat"=>'d.m.Y');
$cols[] = $col;
$col = array();
$col['title'] = "Variabilný symbol";
$col['name'] = "vs";
$col['editable'] = TRUE;
$cols[] = $col;
$col = array();
$col['title'] = "Lektor";
$col['name'] = "id_lektor";
$col['editable'] = TRUE;
$cols[] = $col;
$col = array();
$col['title'] = "Miesto";
$col['name'] = "id_miesto";
$col['editable'] = TRUE;
$cols[] = $col;
$col = array();
$col['title'] = "Firma";
$col['name'] = "firma";
$col['editable'] = TRUE;
$cols[] = $col;
$col = array();
$col['title'] = "Ičo";
$col['name'] = "ico";
$col['editable'] = TRUE;
$cols[] = $col;
$g->set_columns($cols);
$out = $g->render("list1");