Q:

Why does changing the HeaderStyle of a ListView hang the application?

I've been trying to fix this issue and it seems to be a problem from the .Net framework. anyway, I have a listview which contains 5000+ items and a button used to do further processing to the selected items in the listview. now clicking this button should also set "listview.HeaderStyle" property of the listview to "ColumnHeaderStyle.Nonclickable".
now when I do that. the program hangs for like 10 seconds then continues its work. I have no idea what is causing and why this is happening. I hope you guys have a solution for this.
any ideas? 

A:

I've found a basic solution for now, all I need is to set 
myListview.ColumnClick += new ColumnClickEventHandler(delegate{});
Now I don't need to change "listview.HeaderStyle" property anymore.
basically I was disabling the ColumnClick event from the HeaderStyle property and that's all. so instead of setting the HeaderStyle to nonClickable. I just remove/change the function inside event handler.

