We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How can I change the font family of a Grid's ContextMenu ?

Thread ID:

Created:

Updated:

Platform:

Replies:

132400 Aug 30,2017 02:41 PM UTC Sep 1,2017 06:22 AM UTC JavaScript 3
loading
Tags: ejGrid
tomer
Asked On August 30, 2017 02:41 PM UTC

Hi,
How can I change the font family of a Grid's ContextMenu ?

<ej:Grid ID="Grid1" runat="server">
    <ContextMenuSettings EnableContextMenu="true" DisableDefaultItems="true">
        <CustomContextMenuItem>
            <ej:CustomContexMenuItems Id="DetailsCustomContexMenuItem1" Text="Details 1" /> 
            <ej:CustomContexMenuItems Id="DetailsCustomContexMenuItem2" Text="Details 2" /> 
        </CustomContextMenuItem>
    </ContextMenuSettings>
    <Columns>
        <ej:Column Field="id" Visible="false" />
        <ej:Column Field="time" HeaderText="Time"/>
    </Columns>
</ej:Grid>


Thanks,
   Tomer

Vignesh Natarajan [Syncfusion]
Replied On August 31, 2017 11:03 AM UTC

Hi Tomer, 

Thanks for contacting Syncfusion support 

Query: “How can I change the font family of a Grid's ContextMenu ?”  

We have achieved your requirement by setting font-family css style to custom Content Menu list using style tag as show in code snippet below  

<style type="text/css"> 
       .e-context.e-menu .e-list>a.e-menulink 
       { 
           font-family:'Vladimir Script'; 
       } 
   </style> 
   
We have prepared a sample based on your requirement, the same can be downloaded from below link 

Please refer the below screenshot for font-family changed to context menu list. 

 

Regards, 
Vignesh Natarajan. 



tomer
Replied On August 31, 2017 12:29 PM UTC

Doesn't work for me.


Maybe because i'm using version 14.1460.0.46 ?


Here is the aspx page:


<%@ Page Title="GridTest3" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeFile="GridTest3.aspx.cs" Inherits="GridTest3" %>

<%@ Register assembly="Syncfusion.EJ.Web, Version=14.1460.0.46, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" namespace="Syncfusion.JavaScript.Web" tagprefix="ej" %>

<%@ Register Assembly="Syncfusion.EJ, Version=14.1460.0.46, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" namespace="Syncfusion.JavaScript.Models" TagPrefix="ej" %> 


<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<div id = "ControlRegion">

<div class="frame ">

    <div>

        <ej:Grid ID="Grid1"  AllowPaging="True" AllowScrolling="true" runat="server">

            <ContextMenuSettings EnableContextMenu="true" DisableDefaultItems="true">

                    <CustomContextMenuItem>

                        <ej:CustomContexMenuItems Id="clear" Text="Clear Selection" /> 

                    </CustomContextMenuItem>

                </ContextMenuSettings>

            <Columns>

                <ej:Column Field="OrderID" HeaderText="Order ID" IsPrimaryKey="true"  TextAlign="Right" Width="120" />

                <ej:Column Field="CustomerID" HeaderText="Customer ID" Width="150"  />

                <ej:Column Field="EmployeeID" HeaderText="Employee ID" TextAlign="Right" Width="130"  />

                <ej:Column Field="Freight" HeaderText="Freight"  TextAlign="Right" Width="150" Format="{0:C}" />

                <ej:Column Field="OrderDate" HeaderText="Order Date" Width="160"   TextAlign="Right" Format="{0:MM/dd/yyyy}" />

                

            </Columns>            

              <EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="True"></EditSettings>

            

        </ej:Grid>

    </div>

   <style type="text/css">

       .e-context.e-menu .e-list>a.e-menulink

       {

           font-family:Arial;

           font-size:x-large;

       }

   </style>


        </div>

</div>

</asp:Content>



Thanks, 

  Tomer


Venkatesh Ayothi Raman [Syncfusion]
Replied On September 1, 2017 06:22 AM UTC

Hi Tomer, 

Thanks for the update. 

We have added the ‘.e-menulink’ class in our latest Essential Studio version. But you are using Essential Stduio  v14.1.0.46. In that version, “.e-menulink” has not added for the context menu items. This is the cause of the issue and we suggest you to following code example for your requirement, 

<style type="text/css">  
       .e-context.e-menu .e-list>a 
       {  
           font-family:'Vladimir Script';  
       }  
   </style>  
 

Regards, 
Venkatesh Ayothiraman. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;