Hi,
I am trying to add a custom context menu to a Grid control as follows:
@(Html.EJ().Grid<Object>("FlatGrid")
.AllowPaging()
.ContextMenuSettings(contextMenu =>
{
contextMenu.EnableContextMenu().CustomContextMenuItems(new List<string>() { "MyMenuItem" });
})
.ClientSideEvents(eve => { eve.ContextClick("contextclick").RightClick("rightclick").ContextOpen("contextopen"); })
.Columns(col =>
{
col.Field("BookingCode").HeaderText("Booking Code").Add();
col.Field("BookingDate").HeaderText("BookingDate").Format("{0:dd/MM/yyyy}").Add();
col.Field("CustomerReference").HeaderText("Customer Reference").Add();
col.Field("Note").HeaderText("Note").Add();
col.Field("StatusCode").HeaderText("Status").Add();
col.Field("TypeCode").HeaderText("Type").Add();
}))
but get the following compilation error:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1660: Cannot convert lambda expression to type 'Syncfusion.JavaScript.Models.ContextSettings' because it is not a delegate type
Source Error:
|
Line 88: .AllowPaging()
Line 89:
Line 90: .ContextMenuSettings(contextMenu =>
Line 91: {
Line 92: contextMenu.EnableContextMenu().CustomContextMenuItems(new List<string>() { "MyMenuItem" });
|
Any help to resolve this issue would be much appreciated.