How to disable sorting in datagrid at runtime

Hi Team,
Can any one able to help me to disable sorting functionality for a datagrid when the rows in the grid are disabled. I would like to do it at runtime



Thanks & Regards,
Pavan K