I have tried several attempts to add a item to the HeaderContextMenu. I was able to add a item utilizing this method
The Postback method is because I was attempting to find a way to set a server side procedure on click. I removed the excess code from my failed attempts. There inlies the problem. I cannot for the life of me find a way to set the onclick method for the item that I added and when it is clicked I get a runtime error:
Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object.
Protected Overloads Overrides Sub OnPreRenderComplete(ByVal e As EventArgs) Dim menu As RadContextMenu = rgvSchedules.HeaderContextMenu
Dim item As New RadMenuItem() item.Text = "Paste Results" item.PostBack = True menu.Items.Add(item) MyBase.OnPreRenderComplete(e) End SubThe Postback method is because I was attempting to find a way to set a server side procedure on click. I removed the excess code from my failed attempts. There inlies the problem. I cannot for the life of me find a way to set the onclick method for the item that I added and when it is clicked I get a runtime error:
Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object.