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

Grid OnRowContextMenu for Mac

9 Answers 187 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bennett
Top achievements
Rank 1
Bennett asked on 14 Jul 2008, 11:16 PM
I have a Grid to which I have added a context menu that appears when the OnRowContextMenu event fires.  This works perfectly on Windows systems, but on a Mac (using Firefox), the OnRowContextMenu event doesn't seem to fire at all.  I've tested several of the other ClientEvents, and they all seem to fire.  Is this a problem with Mac, or am I doing something wrong?

Thanks for any help.

9 Answers, 1 is accepted

Sort by
0
Pavel
Telerik team
answered on 17 Jul 2008, 02:36 PM
Hi Bennett,

I have performed some testing on a Mac machine with FF version 2 and 3. The OnRowContextMenu client event is fired as expected. You can find the website I used attached. Give it a try and let us know what you think.

Sincerely yours,
Pavel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Bennett
Top achievements
Rank 1
answered on 22 Jul 2008, 08:00 PM
I think I have figured out how to trigger the problem, even in the project you provided.  In the ClientSettings section, try adding combinations of the following:

AllowRowsDragDrop="True"
<Selecting AllowRowSelect="True" />
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
<ClientEvents OnRowContextMenu="RowContextMenu" />

It seems that by adding all of these features, the OnRowContextMenu event is broken in FF3 on the Mac.  If I remove AllowRowsDragDrop, then it works fine.  But I need to allow drag and drop.  Also, I think it works if I remove AllowRowSelect, but again, I need to have that.

If you need further information, please ask.  But I think this should show you where the problem is.  Please let me know if you figure anything out.

Thanks!
0
Pavel
Telerik team
answered on 25 Jul 2008, 06:12 AM
Hello Bennett,

Indeed, you are right. The problem can be reproduced with the following ClientSettings:

<ClientSettings AllowRowsDragDrop="true"
       <Selecting AllowRowSelect="True"/> 
       <ClientEvents OnRowContextMenu="RowContextMenu"/> 
</ClientSettings> 

It can be observed under FF3 only on Mac. I will notify our developers about it and hopefully they will be able to come up with a resolution quickly. Please excuse us for any temporary inconvenience this might have caused you. As a small token of gratitude for bringing this issue to our attention I have updated your Telerik points.

Greetings,
Pavel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Bennett
Top achievements
Rank 1
answered on 28 Jul 2008, 04:03 PM
Thank you for looking into this, I'll be looking forward to the solution.  I'm glad I was able to find a way to help you make your tools even better!


0
Pavel
Telerik team
answered on 29 Jul 2008, 10:23 AM
Hello Bennett,

Our developers were able to resolve the issue. Please find attached our latest internal build of the controls. Give it a try and let us know if you find anything wrong with it.

All the best,
Pavel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Dave
Top achievements
Rank 1
answered on 05 Sep 2008, 04:14 PM
I am using the latest version of Telerik Rad Controls for ASP.NET AJAX (2008.2.826.35) and the RadContextMenu is not working in Firefox 3 on the PC (i'm assuming it doesn't work on the Mac either).  When I right-click on an item in the radgrid, instead of getting the rad context menu like I do in IE, I get the browser menu.  Here is my code:

<telerik:RadGrid ID="grdAllTerms" Height="100%" runat="server" CssClass="GridItem" 
    GridLines="None" Width="100%" BorderStyle="None" ShowHeader="False"
<clientsettings> 
    <ClientEvents OnRowContextMenu="RowContextMenu" /> 
    <Selecting AllowRowSelect="True" /> 
    <Scrolling UseStaticHeaders="true" /> 
</clientsettings> 
<pagerstyle mode="NumericPages" /> 
<mastertableview gridlines="None" allowpaging="False" showfooter="false" pagerstyle-visible="false" 
    nomasterrecordstext="All Thesaurus Terms could not be loaded" autogeneratecolumns="False" 
    datakeynames="Term"
    <RowIndicatorColumn Visible="False"
    <HeaderStyle Width="20px" /> 
    </RowIndicatorColumn> 
    <ExpandCollapseColumn Resizable="False" Visible="False"
    <HeaderStyle Width="20px" /> 
    </ExpandCollapseColumn> 
    <Columns> 
    <telerik:GridBoundColumn DataField="Term" ReadOnly="True" SortExpression="Term" UniqueName="Term" 
        Visible="true"
    </telerik:GridBoundColumn> 
    </Columns> 
    <PagerStyle Visible="False" /> 
</mastertableview> 
</telerik:RadGrid> 
<input type="hidden" id="RadGridClickedRowIndex" name="RadGridClickedRowIndex" /> 
<telerik:RadContextMenu ID="mnuAddTerm" runat="server" OnItemClick="mnuAddTerm_ItemClick"
<Items> 
    <telerik:RadMenuItem Text="Review Term" Value="RVT" /> 
    <telerik:RadMenuItem Text="Add as Broader Term" Value="BT" /> 
    <telerik:RadMenuItem Text="Add as Narrower Term" Value="NT" /> 
    <telerik:RadMenuItem Text="Add as Related Term" Value="RT" />                         
    <telerik:RadMenuItem Text="Add as USE" Value="USE" /> 
    <telerik:RadMenuItem Text="Add as Used For" Value="UF" /> 
</Items> 
</telerik:RadContextMenu> 

Here is the RowContextMenu js function:

    <telerik:RadScriptBlock runat="server"
        <script type="text/javascript">    
                function RowContextMenu(sender, eventArgs) { 
                     
                    var menu = $find("<%= mnuAddTerm.ClientID %>"); 
                    var evt = eventArgs.get_domEvent(); 
                     
                    if(evt.target.tagName == "INPUT" || evt.target.tagName == "A")  
                    { 
                      return; 
                    }  
                     
                    var index = eventArgs.get_itemIndexHierarchical(); 
                    document.getElementById("radGridClickedRowIndex").value = index
                     
                    sender.get_masterTableView().selectItem(sender.get_masterTableView().get_dataItems()[index].get_element(), true); 
                     
                    menu.show(evt); 
                     
                    evt.cancelBubble = true
                    evt.returnValue = false
 
                    if (evt.stopPropagation) 
                    { 
                       evt.stopPropagation(); 
                       evt.preventDefault(); 
                    } 
                } 
        </script> 
    </telerik:RadScriptBlock> 


0
Sebastian
Telerik team
answered on 08 Sep 2008, 08:28 AM
Hello Dave,

I tried to reproduce the issue on this online demo under FireFox 3.0.1 but unfortunately to no avail. The context menu was displayed as expected when right-clicking an arbitrary grid record - can you please verify that on your machine and confirm that you are using the latest hotfix 2008.2.826 of RadControls for ASP.NET AJAX? Can it be that some particular browser settings you have produce the unexpected behavior? Any further details can help us designate the cause of the issue to address it asap.

Best regards,
Stephen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Samee Mir
Top achievements
Rank 1
answered on 02 Sep 2010, 12:15 PM
Hi There,

I am also having the same issue, the context menu is not being shown in FF(MAC),

if i use this

<ClientSettings AllowRowsDragDrop="true"
       <Selecting AllowRowSelect="True"/> 
       <ClientEvents OnRowContextMenu="RowContextMenu"/> 
</ClientSettings> 


I have another grid which context menu is working fine,
<ClientSettings>
       <ClientEvents OnRowContextMenu="RowContextMenu"/>                
       <Selecting AllowRowSelect="true" />
</ClientSettings>


the version i am using is 2010.1.519.35.

Need help urgently.


Regards,
Samee
0
Pavel
Telerik team
answered on 07 Sep 2010, 10:50 AM
Hello Samee,

I am attaching for you a simple test page in which the context menu is displayed as expected on my end when run on FireFox for Mac. Try it out and let me know if I am missing something important.

Regards,
Pavel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Bennett
Top achievements
Rank 1
Answers by
Pavel
Telerik team
Bennett
Top achievements
Rank 1
Dave
Top achievements
Rank 1
Sebastian
Telerik team
Samee Mir
Top achievements
Rank 1
Share this question
or