jQuery UI Widgets Forums Layouts Kanban Multiple jqxkanbans issue

This topic contains 1 reply, has 2 voices, and was last updated by  Hristo 5 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Multiple jqxkanbans issue #103269

    wallace.wolf
    Participant

    Hi!

    I’m using multiple jqxkanbans on same page, building an structure dinamically and everything woks fine to show kanban elements. But I dont know why, all jqxkanban cards are related with the first kanban.

    The problem is: can’t move those cards between columns that are from their own kanban.

    Here’s the code:

    
    var html = '';
    for (var i = 0; i < data.Data.Issues.length; i++) {
      issue = data.Data.Issues[i];
      html += '<div id="kanban-issue-header-' + issue.IssueKey + '" style="width: 100%;">';
      html += '  header content';
      html += '</div>';
      html += '<div id="kanban-issue-' + issue.IssueKey + '"></div>';
    }
    
    $('#content-kanban').html(html);
    
    for (var j = 0; j < data.Data.Issues.length; j++) {
      issue = data.Data.Issues[j];
    
      $('#kanban-issue-' + issue.IssueKey).jqxKanban({
        resources: new $.jqx.dataAdapter(issue.resourceSource),
        source: new $.jqx.dataAdapter(issue.dataSource),
        width: '100%',
        height: '100%',
        columns: [
          { text: 'Backlog', dataField: 'Backlog', collapsible: false },
          { text: 'In Progress', dataField: 'Doing', collapsible: false },
          { text: 'Impediment', dataField: 'Impediment', collapsible: false },
          { text: 'Done', dataField: 'Done', collapsible: false, maxItems: issue.dataSource.localData.length }
        ],
        columnRenderer: function (element, collapsedElement, column) {
          if (column.maxItems < 9999) {
            var columnItems = $('#kanban-issue-' + issue.IssueKey).jqxKanban('getColumnItems', column.dataField).length;
            element.find(".jqx-kanban-column-header-status").html(" (" + columnItems + "/" + column.maxItems + ")");
          }
        }
      });
    }
    
    Multiple jqxkanbans issue #103352

    Hristo
    Participant

    Hello wallace.wolf,

    I tested this example and it seems to work fine:
    https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxkanban/kanban-connected.htm?light
    The approach that you use is not correct.
    Please, provide me with more information about your scenario and if the example above does not help you I will try to suggest you something else.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.