Actioncolumn With Sqldataprovider

Hi, while using an Sql Data provider with a GridView widget, the ActionColumn does not have the correct id. How can I pass the correct ID or Key for the current row item to the ActionColumn so the links on grid view index are correct? Thanks!

where is the relevant code?

Solution is:

Assuming you are using an SQL Data provider like in the docs:

You need to add the Key and reference your ID field as shown below.

'totalCount' => $count,

            'key' => 'id', // add this in your SqlDataProvider

Solution courtesy of - alirz23