To prevent sorting, due to click in checkbox which is appene

The added code just block event propagation for parent elements, it will not block the events on checkbox element.
You can attach event handler by any possible way - by attachingEvent or by adding some custom code to existing onclick event.