Hi, i added two fields to the admin
array(
‘header’ => “Created by”,
‘value’ => ‘$data->created->name’,
),
array(
‘header’ => “Updated by”,
‘value’ => ‘$data->updated->name’,
),
but i can order by those two fields… how can i do that?
Hi, i added two fields to the admin
array(
‘header’ => “Created by”,
‘value’ => ‘$data->created->name’,
),
array(
‘header’ => “Updated by”,
‘value’ => ‘$data->updated->name’,
),
but i can order by those two fields… how can i do that?
You can’t sort until you have a name for these fields, how will the Sort function know what to sort?
Try this:
array(
'name' => 'created',
'header' => "Created by",
'value' => '$data->created->name',
),
array(
'name' => 'updated',
'header' => "Updated by",
'value' => '$data->updated->name',
),
You must specify a ‘name’ if you want to have sorting enabled.