新年快乐!
我希望能够将某些列的默认值设置为降序。因此,当用户第一次点击该列时,它按性质排序降序。
设置网格的默认排序字段和顺序没有问题。但这就是我找到的所有信息。
$grid->setGridOptions(array(
"caption"=>"Player Statistics",
"rowNum"=>200,
"rowList"=>array(50,200,1000),
"sortname"=>"percentOwned",
"sortorder" => 'desc',
"width" => 1000,
"height" => 400,
"hoverrows" => true,
"viewrecords" => false
));
如何将默认排序设置为逐列降序?有可能吗?
谢谢!
答案 0 :(得分:6)
虽然不在文档中,'firstsortorder'=> 'desc'可以解决问题。
$grid->setGridOptions(array(
'firstsortorder' => 'desc'
"caption"=>"Player Statistics",
"rowNum"=>200,
"rowList"=>array(50,200,1000),
"sortname"=>"percentOwned",
"sortorder" => 'desc',
"width" => 1000,
"height" => 400,
"hoverrows" => true,
"viewrecords" => false
));