I have created custom admin grid(without ui component). While edit action it needs to get id from DB to display the existing data in form. Grid.php
$this->addColumn(
'edit', [
'header' => __('Edit'),
'type' => 'action',
'actions' => [
[
'caption' => __('Edit'),
'url' => $this->_url->getUrl('*/*/*', ['id' => '1', 'active_tab' => 'upload']),
],
//
],
'filter' => false,
'sortable' => false,
'header_css_class' => 'col-action',
'column_css_class' => 'col-action'
]
);
In above code, I have given id statically as 1 and it loads the data and displayed in the form, but now I need to get Id from DB dynamically, Please provide me a solution