This is a migrated thread and some comments may be shown as answers.

UI for ASP.NET AJAX RadContext Menu

4 Answers 122 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Swetha
Top achievements
Rank 1
Swetha asked on 15 Sep 2017, 10:41 AM

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

Sort by
0
Marin Bratanov
Telerik team
answered on 18 Sep 2017, 10:27 AM

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:

If this does not help, could you modify the sample to showcase the problem and also point out what I am missing?

Regards,

Marin Bratanov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Swetha
Top achievements
Rank 1
answered on 19 Sep 2017, 10:43 AM

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

0
Accepted
Marin Bratanov
Telerik team
answered on 20 Sep 2017, 09:56 AM

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,

Marin Bratanov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Swetha
Top achievements
Rank 1
answered on 04 Oct 2017, 08:56 AM

Marin Bratanov,

Sure move this thread to the public forum. Thanks for the clear explanation.

Thanks,

Swetha

Tags
Menu
Asked by
Swetha
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Swetha
Top achievements
Rank 1
Share this question
or