Hi Telerik team,
I have added RadContextMenu for RadGrid. In that context menu Adding ,removing items and all actions performing using Javascript.
Problem Scenario:
If I right click on grid first row, menu showing normally in down. We don’t have any issue on this. But if I right click on last row, the menu coming out side of the grid. Please check the attached screenshots and sample project for your reference.
I have tried to change currentStyle property for RadContextMenu using JS. But, it’s showing not editable.
- ContextMenuId._contextMenuElement.currentStyle.top=”200px”;
Kindly provide solution for right click menu to adjust height and width inside the grid when right click on any place of grid.
Note: I have fixed the grid size and please provide the solution/fix using JavaScript.
Thanks,
Swetha
4 Answers, 1 is accepted
Hello Swetha,
I am attaching a short video that shows this context menu working as expected for me. Could you review it and see if I am missing something? In the meantime, here are a few pointers that may help you out:
- make sure IE is not running in Compatibilty Mode and there are no script errors
- when having appearance issues with our controls, follow this article: http://docs.telerik.com/devtools/aspnet-ajax/general-information/troubleshooting/skins-troubleshooting#incorrect-or-distorted-appearance.
- review this article on wrong positions: http://www.telerik.com/support/kb/aspnet-ajax/details/incorrect-positioning-of-controls.
If this does not help, could you modify the sample to showcase the problem and also point out what I am missing?
Regards,
Marin BratanovProgress Telerik
Hi,
Thanks for giving reply.
I have seen the attached video. But, we are facing different issue which is not related to browser compatibility. Even I have tried the compatibility setting earlier in IE11 and I tried to open in chrome also. Both are having same problem.
Issue is:
Now, my Radcontextmenu having only 4 items. So if we right click on first row of Rad Grid, don’t have any issue. It will place inside the grid. But, if we click on last row of Rad Grid, some menu items are going outside the Grid layout. (Note : In some pages we have menu items more 8 or 10).
Expected solution:
If we click on last row of grid, the context menu should not go outside of the Grid Layout. In this scenario, menu should open like attached screenshot name : Expected_Output.JPG (We have done editing using editing tool)
Please check the screenshots for more information.
Note: I have fixed grid height and added RadContextMenu items dynamically from JS. So, provide the solution using JavaScript.
Thanks,
Swetha
Hi Swetha,
Thank you for the explanations, I now understand the situation. I am sorry to say, however, that RadContextMenu does not have a feature that will contain it in a certain area of the page. If you want to see it implemented in the control, you can add it to our feedback portal: https://feedback.telerik.com/project/108/Feedback/List/Feature%20Request. Providing detailed explanations on how you expect the feature to work and how it should be exposed for configuration will help our customers evaluate, comment and vote on the idea which will, in turn, determine its priority.
Nevertheless, I am attaching here an example function override that can help you position the context menu as desired. You can use that as base for further development, if needed. I must note that this is not extensively tested and I cannot guarantee it will fit all scenarios and needs.
On a side note, would you mind if I moved this thread to the public forums so other people with a similar scenario can benefit from this example?
Regards,
Progress Telerik
Marin Bratanov,
Sure move this thread to the public forum. Thanks for the clear explanation.
Thanks,
Swetha