How to avoid sending all data in ActionColumn

Hi guys,
following code will show me all records in database in kartik alert. My intention is only to get data of record having pushed in GridView. any ideas, how to achieve my intention?

  [
        'class' => 'yii\grid\ActionColumn',
        'template' => '{kunde}',
        'buttons' => [
            'kunde' => function ($model, $id) {
                $output = "";
                $expression = new yii\db\Expression('NOW()');
                $now = (new \yii\db\Query)->select($expression)->scalar();
                $idTermin = $id->id;
                $idOfmodelAdminBesKu = \frontend\models\Adminbesichtigungkunde::findOne(['besichtigungstermin_id' => $idTermin])->id;
                $kundeID = \frontend\models\Adminbesichtigungkunde::findOne(['id' => $idOfmodelAdminBesKu])->kunde_id;
                $kundenGeschlecht = frontend\models\Kunde::findOne(['id' => $kundeID])->geschlecht;
                $kundenVorName = frontend\models\Kunde::findOne(['id' => $kundeID])->vorname;
                $kundenNachName = frontend\models\Kunde::findOne(['id' => $kundeID])->nachname;
                $kundeStadt = frontend\models\Kunde::findOne(['id' => $kundeID])->stadt;
                $kundeStrasse = frontend\models\Kunde::findOne(['id' => $kundeID])->strasse;
                $kundeGeburtsdatum = frontend\models\Kunde::findOne(['id' => $kundeID])->geburtsdatum;
                $diff = strtotime($now) - strtotime($kundeGeburtsdatum);
                $hours = floor($diff / (60 * 60));
                $year = floor($hours / 24 / 365);
                $output = date("d.m.Y", strtotime($kundeGeburtsdatum)) . "<br>" . $year . " Jahre alt";
                $giveBack=$kundenGeschlecht.' '.$kundenVorName.' '.$kundenNachName.'\n'.'wohnhaft in '.$kundeStadt. ' '.$kundeStrasse.'\n'.'Geburtsdaten:'.' '.$output;
                //$js = "krajeeDialog.alert('Hold On! This is a Krajee alert!');";
                $js="krajeeDialog.alert('$giveBack');";
                return Html::a('<span class="glyphicon glyphicon-user"></span>', [$this->registerJs($js)], ['title' => 'Interessent anzeigen', 'data' => ['pjax' => '0']]);
            },
        ],
    ],

Solved it like this, rendering same content again in new Controller method:

return Html::a('<span class="glyphicon glyphicon-home"></span>', ['/termin/link', 'id' => $id->id], ['title' => 'Interessent anzeigen', 'data' => ['pjax' => '0']]);

You are wrong signing the callbacks of the custom button, check this https://www.yiiframework.com/doc/api/2.0/yii-grid-actioncolumn#$buttons-detail

You don’t need to do any query inside the button callbacks , the model is the second parameter.