Zend certified PHP/Magento developer

How to make query sort by number not by alphabet in admin grid filter?

In my custom_table have custom_field (type varchar)- but I only insert the number on that field.
My problem is when I filter custom_field by range in the admin grid,
the query is
select `main_table`.* from `custom_table` as `main_table` where (custom_field >= '0') and (custom_field <= '40')
It will sort by alpha, so it will include other value custom_field (100,120,230,350,…) – it is not the value I want

How I can make it sort by number not by alpha?

I Change the query to
select `main_table`.* from `custom_table` as `main_table` where (custom_field >= 0) and (custom_field <= 40)
It Works. But I have no idea how to make Magento grid filter query like that.