Skip to content

Error: Class 'C_DataGrid' not found in (PHP Namespace)

Problem:
I unzipped the phpGrid update to start testing in Laravel. Getting this error on call to new grid:

Fatal error: Class 'C_DataGrid' not found in...

Solution:
phpGrid start supporting PHP namespace in version 6.7 to avoid naming collisions. Namespace is essential for forward compatibility that PHP introduced since version 5.3. 

Version 7.5 or later

use phpCtrl\C_DataGrid;

Prior to version 7.5

use phpGrid\C_DataGrid;

Everything else stays the same. 

Read more on PHP namespace: 

Feedback and Knowledge Base