I normally use an observer to add a column to the grid. See this page (german language) how to do this.
Also the full module of this tutorial is available on GitHub.
But to help you, a bit of source code would be fine. Which custom column would you like to filter? Which values can it have?
I did it like this (in file Observer.php)
$grid->addColumnAfter(
'custom_column_code', // replace by your column code
array(
'header' => 'Label of your column',
'index' => 'custom_column_code', // replace by your column code
'type' => 'options',
'renderer' => 'YourCompany_YourModule_YourRenderer',
'filter_condition_callback' => array($this, '_filterHasMyCustomConditionCallback')
'options' => array( //these are your filter options
'1' => 'Yes',
'0' => 'No'
),
),
'name'
);
and then also in Observer.php
public function _filterHasMyCustomConditionCallback($collection, $column)
{
$value = $column->getFilter()->getValue();
if ($value == '0')
{
// join custom_column LEFT (inner join fails on NULL values) and filter by NULL
$collection->addAttributeToFilter('custom_column_code', array(['null' => true]), 'left');
}
else
{
// filter all by NOT NULL
$collection->addFieldToFilter('custom_column_code', ['notnull' => true]);
}
return $this;
}