Model relation not working

Other model data not showing in my Gridview.

I have 2 models,ListForms and Lists.

I want to show list name from Lists on listforms gridview.

This is my code.

ListForms Model:




class ListForms extends \yii\db\ActiveRecord

{


       // relation name

	public $listname;

	

	

    /**

     * @inheritdoc

     */

    public static function tableName()

    {

        return 'listForms';

    }

  

   

     public function getListname() {   

		return $this->hasOne(Lists::classname(), ['listid' => 'listids']);	 		

	}






ListForms GridView:




              [

		'label'=>'List Name',

		'attribute' => 'listname',

		'value' => 'listname.listname'

	      ],

			



ListFormsSearch:




      public function search($params){    	   	

        $query = ListForms::find();

		$query->joinWith(['listname']);		

		//...		

	}



I am not allowed to send post with link. So sorry for the obfuscation. Try this tutorial www.ramirezcobos.com/2014/04/16/displaying-sorting-and-filtering-model-relations-on-a-gridview-yii2/