If you mean to disable the right-click menu on the bar, then official website has the answer.
You set it directly.
Gridoptionsmenu。 The EnableColumnmenu attribute is sufficient.