How to treat textfield as integer field while adding sorting in views?
Solved it by adding a custom handler and used CAST Functions of mysql and changing the query to :

$this-&gt;query-&gt;add_orderby(NULL, 'CAST(' . $this-&gt;real_field . ' AS SIGNED)', $this-&gt;options['order']);