Admin Custom module Grid is showing title only data is not showing from the grid in magento2:

  • Some times our custom admin grid show empty data grid.
  • It is showing only title but grid container  is not showing.
  • This might be following any one reason.
1. Cross verify your Database tables. Whether the table is having data or not.
2. Also verify is there any duplicate primary key or duplicate data is present in the table or not.
3. Verify is there any fatal error present or not in the php block file.
4. Verify the system log once.

In my-case i have received following error message from system log.
main.CRITICAL: Notice: Undefined offset: 0 in /Helper/Renderer.php on line 10 [] []
Sample Script:
$collection = $obj->load(10); //sample script only
return $collection[0][‘myname’];
Seems i have used one renderer file for my grid. Mean as per the above collection, a collection will give empty
result set. Due to this my grid was not showing.

 

Leave a Reply