Here is my scenerio:
I originally had the imagebutton and contextmenu in a user control. It was showing the context menu fine, and the items were added correctly. But I was getting an "undefined" javascript error. Basically you had to click the image before the context menu would load...after that you would have "right-click access".
I have a RadGrid that is populated by data.
The first column of the radgrid has an imagebutton and that imagebutton will click off a contextmenu that will be filled depending on the DataItem in the row.
Currently, each row item is added in the ItemDataBound event ... e.Item.DataItem and that is set to an Order object. That order object is passed into a Method that sorts out the items and builds a dictionary GetList(Order order). That GetList is set to the RadContextMenu Datasource. So for each row in the first column, that image button context menu might have different items.
My problem is this:
I originally had the imagebutton and contextmenu in a user control. It was showing the context menu fine, and the items were added correctly. But I was getting an "undefined" javascript error. Basically you had to click the image before the context menu would load...after that you would have "right-click access".
Then I moved the context menu and image button back into the radgrid directly on the page. Now the context menu doesn't work at all.
Am I missing something here? Do I have use the ajaxmanager? Will that even work in my scenerio with me having an image object in the first column of a radgrid?
**** Update
Found the answer. It was an old RadGrid in the usercontrol from the designer file that was messing it up. Took that out and made sure the sender event from the usercontrol was cast correctly.