jQWidgets Forums

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts

  • kr.nanditha
    Member

    Hi Mariya,

    Thanks for your reply. I have put both drag drop and filter in my code as below. The rowfilter is shown but is disabled when dragdrop is present. However when i remove the rendered function, the rowfilter is enabled. Please find an example code below.

    When I do remove dragdrop the $(“#jqxgrid”).jqxGrid(
    {
    width: 320,
    source: dataAdapter,
    theme: theme,
    autoheight: true,
    showfilterrow: true,
    filterable: true,
    selectionmode: ‘multiplerows’,
    columns: columns,

    rendered: function () {
    // select all grid cells.
    var gridCells = $(‘#jqxgrid’).find(‘.jqx-grid-cell’);
    if ($(‘#jqxgrid’).jqxGrid(‘groups’).length > 0) {
    gridCells = $(‘#jqxgrid’).find(‘.jqx-grid-group-cell’);
    }
    // initialize the jqxDragDrop plug-in. Set its drop target to the second Grid.
    gridCells.jqxDragDrop({
    appendTo: ‘body’, theme: theme, dragZIndex: 99999,
    dropAction: ‘none’,
    initFeedback: function (feedback) {
    feedback.height(70);
    feedback.width(220);
    }
    });
    // initialize the dragged object.
    gridCells.off(‘dragStart’);
    gridCells.on(‘dragStart’, function (event) {
    var value = $(this).text();
    var position = $.jqx.position(event.args);
    var cell = $(“#jqxgrid”).jqxGrid(‘getcellatposition’, position.left, position.top);
    $(this).jqxDragDrop(‘data’, $(“#jqxgrid”).jqxGrid(‘getrowdata’, cell.row));
    var rowsindexes = $(“#jqxgrid”).jqxGrid(‘getselectedrowindexes’);
    var rows = [];
    var clickedrow = cell.row;
    var isselected = false;
    for (var i = 0; i 1) {
    // update feedback’s display value.
    var feedback = $(this).jqxDragDrop(‘feedback’);
    if (feedback) {
    feedback.height(rows.length * 25 + 25);
    var table = ”;
    table += ”;
    $.each(columns, function (index) {
    table += ”;
    table += this.text;
    table += ”;
    });
    table += ”;
    $.each(rows, function () {
    table += ”;
    table += ”;
    table += this.FirstName;
    table += ”;
    table += ”;
    table += this.LastName;
    table += ”;
    table += ”;
    table += this.Organization;
    table += ”;
    table += ”;
    });
    table += ”;
    feedback.html(table);
    }
    // set the dragged records as data
    $(this).jqxDragDrop({ data: rows })
    }
    });
    gridCells.off(‘dragEnd’);
    gridCells.on(‘dragEnd’, function (event) {
    var value = $(this).jqxDragDrop(‘data’);
    var position = $.jqx.position(event.args);
    var pageX = position.left;
    var pageY = position.top;
    var $destination = $(“#jqxgrid2”);
    var targetX = $destination.offset().left;
    var targetY = $destination.offset().top;
    var width = $destination.width();
    var height = $destination.height();
    if (pageX >= targetX && pageX = targetY && pageY <= targetY + height) {
    $destination.jqxGrid('addrow', null, value);
    }
    }
    });
    }

    });

Viewing 1 post (of 1 total)