Columns' hiding using header menu is not working

HI,
i am loading my grid , content and columns everything through xml file like
out.println("");
for(String columnName : columnNameList){
out.print("<column width=“80” type=“ed” sort=“str” >"+columnName+"");
//out.print("<column width=“50” >"+columnName+"");
}
out.println("");
and i am unable hide columns through header menu.

my code:
mygrid.enableHeaderMenu();

any idea…???

Unfortunately we cannot reproduce this issue locally. Please check example here dhtmlx.com/docs/products/dht … _menu.html

i doubt got clarified , i should call mygrid.enableHeaderMenu();
after grid load.
like mygrid.load(“some url”,function(){
mygrid.enableHeaderMenu();
});

it works.
but why must after load?