Column shows undefined index in gridview Yii2

I have a query like this

$query = (new \yii\db\Query())
->select([
‘id’ => ‘room.id’,
‘building_id’=>‘room.building_id’,
‘sqft’ => ‘room.sqft’,
‘rate_per_sqft’ => ‘room.rate_per_sqft’,
‘main_key_1’ => ‘room.main_key_1’,
‘main_key_2’ => ‘room.main_key_2’,
‘main_key_3’ => ‘room.main_key_3’,
‘room_key_1’ => ‘room.room_key_1’,
‘room_key_2’ => ‘room.room_key_2’,
‘room_key_3’ => ‘room.room_key_3’,
‘room_number’=>‘room.room_number’,
‘available_date’=>‘room.available_date’,
‘building_name’=>‘building.building_name’,
‘use’=> ‘room_usage.use’,
‘room_number_for_tax’=> ‘room.room_number_for_tax’,
‘floor’=> ‘room.floor’,
‘price’ =>‘room.price’,
‘status’ =>‘room.status’,
‘room_parameter_constant’=>‘service.room_parameter_constant’,
‘complementory’=> ‘room_status.complementory’,
‘created_at’ => ‘room.created_at’,
‘updated_at’ => ‘room.updated_at’,
‘created_by’ => ‘room.created_by’,
‘updated_by’ => ‘room.updated_by’,
])
->from(‘room’)
->innerJoin(‘building’, ‘building.id = room.building_id’)
->leftJoin(‘room_usage’, ‘room_usage.id = room.use’)
->leftJoin(‘room_status’, ‘room_status.room_id = room.id’)
->leftJoin(‘service’, ‘service.id = room_status.service_id’);

Here grid view shows ''undefined index" error for columns that come from tables that are connected by the join query. Here the first table(building) works perfectly.All other shows errors on grid view.How can I resolve the issue?

Can you show how you render the grid ?