This code works perfectly (date field not in first position):
$g = new jqgrid($db_conf);
$g->table = "test";
$opt = array();
$opt["caption"] = "Test";
$g->set_options($opt);
$cols = array();
$col = array();
$col["title"] = "ID";
$col["name"] = "ID_test";
$cols[] = $col;
$col = array();
$col["title"] = "Text";
$col["name"] = "Text";
$col["editable"] = true;
$cols[] = $col;
$col = array();
$col["title"] = "Data1";
$col["name"] = "Data1";
$col["editable"] = true;
$col["formatter"] = "date";
$col["formatoptions"] = array("srcformat"=>'Y-m-d',"newformat"=>'d/m/Y');
$cols[] = $col;
$col = array();
$col["title"] = "Data2";
$col["name"] = "Data2";
$col["editable"] = true;
$col["formatter"] = "date";
$col["formatoptions"] = array("srcformat"=>'Y-m-d',"newformat"=>'d/m/Y');
$cols[] = $col;
$g->set_columns($cols);
$out_grid_1 = $g->render("list1_1");
and this not (date field in first position):
// grid_1 (Test)
$g = new jqgrid($db_conf);
$g->table = "test";
$opt = array();
$opt["caption"] = "Test";
$g->set_options($opt);
$cols = array();
$col = array();
$col["title"] = "ID";
$col["name"] = "ID_test";
$cols[] = $col;
$col = array();
$col["title"] = "Data1";
$col["name"] = "Data1";
$col["editable"] = true;
$col["formatter"] = "date";
$col["formatoptions"] = array("srcformat"=>'Y-m-d',"newformat"=>'d/m/Y');
$cols[] = $col;
$col = array();
$col["title"] = "Text";
$col["name"] = "Text";
$col["editable"] = true;
$cols[] = $col;
$col = array();
$col["title"] = "Data2";
$col["name"] = "Data2";
$col["editable"] = true;
$col["formatter"] = "date";
$col["formatoptions"] = array("srcformat"=>'Y-m-d',"newformat"=>'d/m/Y');
$cols[] = $col;
$g->set_columns($cols);
$out_grid_1 = $g->render("list1_1");