No subject

Hi, In the datagrid in windows forms, how could I programatically determine that the sort is about to occur and then allow it or prevent it? I don't want to set the datagrid.allowsort=false I tried to do this in the click event but the sort seems to occur before the click event fires. Any help?

Loader.
Up arrow icon