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. Image for the cookie policy date
close icon

Context Menu Disable Default Items not Working

@(Html.EJ().Kanban("Orders")
                                       .DataSource(Model)
                                       .ClientSideEvents(eve => eve.ContextClick("click"))
                                       .Columns(col =>
                                       {
                                           col.HeaderText("Need To Be Reviewed").Key("OrderItemsNeedToBeReviewed").Add();
                                           col.HeaderText("Submitted").Key("Submitted").Add();
                                           col.HeaderText("Accepted").Key("Accepted").Add();
                                           col.HeaderText("In Delivery").Key("InDelivery").Add();
                                           col.HeaderText("Delivered").Key("Delivered").Add();
                                           col.HeaderText("Canceled").Key("Canceled").Add();
                                       })
                                      .AllowTitle(true)
                                      .AllowDragAndDrop(false)
                                  .KeyField("Status")
                          .Locale("en-US")
                                  .Fields(field =>
                                  {
                                      field.Color("#ee2662")
                                           .Title("Title")
                                           .Content("Content")
                                           .SwimlaneKey("Swimlane")
                                           .PrimaryKey("Id");
                                  }).ContextMenuSettings(menu => menu.DisableDefaultItems(a => a.Add(KanbanContextMenuItem.DeleteCard)).CustomMenuItems(custom => custom.Text("Details").Target(ContextTarget.Card).Add()))
        )

1 Reply

BS Buvana Sathasivam Syncfusion Team August 14, 2017 09:17 AM UTC

Hi Musab Adnan Basheer,  
 
Thanks for using Syncfusion Products.  
 
We have created Kanban sample with context menu disabled default item.  We will disable default item of delete card and enable context menu option.  Please refer to the following code.  
 
KanbanFeature.cshtml  
 
@(Html.EJ().Kanban("Kanban")  
        ………  
.ContextMenuSettings(menu => menu.Enable(true)   // Enable context menu settings  
                                 .DisableDefaultItems(a =>                                                    a.Add(KanbanContextMenuItem.DeleteCard))         // Set disable default items  
                                 .CustomMenuItems(custom => custom.Text("Details").Target(ContextTarget.Card).Add()))  // Custom text  
  
)     
     
 
  
 
 
Please check the sample and let you know if we misunderstood any of your requirements.  If so, provide us more details regarding your requirement.  So that, we can check and provide you the best solution.    
  
Please let us know if you have any concerns.  
  
Regards,   
Buvana S.   
 


Loader.
Live Chat Icon For mobile
Up arrow icon