If you need to create join in any grid then you need to existing grid collection. For this example, the grid has own collection. So you can add following code to grid collection.
File: SR/Weblog/Model/ResourceModel/BlogPosts/Grid/Collection.php
protected function _initSelect()
{
parent::_initSelect();
$this->join(
[$this->getTable('second_table_name')],
'main_table.blogpost_id = '.$this->getTable('second_table_name').'.blogpost_id',
array()
);
return $this;
}
Also, you can use:
public function addFieldToFilter($field, $condition = null)
{
}