Issue
In my model, the id
field is missing and I need to render a gridview
which failed to render:
CException
Property "DocumentRequests.id" undefined.
I have a field document_request_id
instead of id
Does the GridView
work with the id
field and if so, how can I override it?
Solution
I found the answer, how to override the id
field if missing:
$data_provider_grid = new CArrayDataProvider($data_provider_grid, array(
'id' => 'user',
'keyField' => 'document_request_id',
'pagination' => array(
'pageSize' => $pageSize,
),
));
Answered By - Ionut Flavius Pogacian
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.