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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

delete card

Thread ID:

Created:

Updated:

Platform:

Replies:

131659 Jul 21,2017 01:17 PM UTC Jul 24,2017 12:26 PM UTC ASP.NET MVC 1
loading
Tags: Kanban
Manolo
Asked On July 21, 2017 01:17 PM UTC

Hi,

I'm using a kanban, but I can't delete a card. When I press del button no events is fired.

In your examples I can delete a card.

This is my kanban (I use a template for edit)

 @(Html.EJ().Kanban("kbPlanificacion")

                      .DataSource(ds => ds.URL(@Url.Action("GetKanbanData", "Planificacion", new RouteValueDictionary(new { id = ViewBag.idProyecto }))).CrudURL(@Url.Action("KanbanCRUD", "Planificacion")).Adaptor(AdaptorType.UrlAdaptor))
                      .AllowSelection(true)
                      .AllowKeyboardNavigation(true)
                      .EnableTouch(true)
                      .Locale("es-ES").AllowDragAndDrop(true).AllowTitle(true)
                      .EnableTotalCount(true)
                      .Columns(col =>
                      {
                          col.HeaderText("Actividad").Key("1").ShowAddButton(true).IsCollapsed(false).Add();
                          col.HeaderText("Sin Empezar").Key("5").AllowDrag(false).AllowDrop(false).Add();
                          col.HeaderText("Fuera de Plazo").Key("4").AllowDrag(false).AllowDrop(false).Add();
                          col.HeaderText("En progreso").Key("2").AllowDrag(false).AllowDrop(false).Add();
                          col.HeaderText("Finalizadas").Key("3").AllowDrag(false).AllowDrop(false).Add();
                          col.HeaderText("Pdte. Empezar").Key("6").AllowDrag(false).AllowDrop(false).Add();
                      })
                      .CardSettings(card =>
                      {
                          card.ColorMapping(
                              col =>
                              {
                                  col.Add("black", "1");  // Negro
                                  col.Add("#ee4e76", "5");  // Rojo
                                  col.Add("#edba3c", "2");  // Azul
                                  col.Add("#57b94c", "3");  // Verde
                                  col.Add("#ee4e75", "4");  // Rojo
                              });
                      })
                      .KeyField("IdEstado")
                      .Fields(field =>
                      {
                          field.PrimaryKey("Id").Title("Nombre").Content("Denominacion").Color("IdEstado");
                      })                     
                      .EditSettings(edit =>
                      {
                          edit.AllowEditing(true).AllowAdding(true)
                          .EditItems(e =>
                          {
                              e.Field("Id").Add();
                              e.Field("FechaInicio").EditType(KanbanEditingType.DatePicker).Add();
                              e.Field("FechaFin").EditType(KanbanEditingType.DatePicker).Add();
                              e.Field("Observaciones").EditType(KanbanEditingType.TextArea).Add();
                          })
                          .EditMode(KanbanEditMode.DialogTemplate)
                          .DialogTemplate("#editTemplate");
                      })

                      .ClientSideEvents(eve => eve.Load("onKanbanLoad").ActionComplete("onKanbancomplete"))
                )


Thanks

Buvana Sathasivam [Syncfusion]
Replied On July 24, 2017 12:26 PM UTC

Hi Manolo,   
  
Thanks for using Syncfusion Product.   
  
You need to focus on a Kanban control to access the keyboard shortcuts.   You can configure the keys to focus the Kanban control. Once the control is on focused state, then you can select any card by clicking on it or by navigating through arrows. The selected card will be deleted if we press “Delete” key and make sure that control is focused properly. We had prepared the sample with the given code example and deleting is working when the control is focused properly.    
  
Please refer to the following code example.     
  
KanbanFeatures.cshtml   
   
<script>   
    //Control focus key   
    $(document).on("keydown", function (e) {   
        if (e.altKey && e.keyCode === 74) { // j- key code.   
            $("#Kanban").focus();   
        }   
    });   
</script>   
  
  
First, you can select any one card and focus the Kanban control using “alt + j” key.  Please refer to the below screenshot.   
  
  
Now, CRUD method was called properly when you pressed “delete” key.  Please refer to the below screenshot.   
  
    
  
Kanban card delete operation was working fine.  Please refer to the below screenshot.   
  
    
  
  
   
  
Please check with the sample and still if you continue to get the error, then let us know more details about the scenario in which issue reproducing or share the issue reproducible sample.  
  
Regards,   
  
Buvana S.   
 


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.

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

;