Error/Bug? when you have a GRId with allowRowDragAndDrop And a checkbox select column

Hi,

I have an error in a grid with allowRowDragAndDrop = true And a checkbox select column.

When the grid is loaded, I need to preselect some rows.

After that, I tried to change the order of the rows, so I moved one to another position, and automatically all the rows selected are not selected anymore, (only the first row, whatever the first row is).


Anyone knows if this Is a BUG or If I have done something wrong? 

var grid = new ej.grids.Grid({
        dataSource: data2,
        allowRowDragAndDrop: true,
        selectionSettings: {type: "Multiple"},
        columns: [
            { type: 'checkbox', headerText: '', width: 140, textAlign: 'Center' },
            { field: 'id', headerText: 'ID', textAlign: 'Right', type: 'string', visible: false, isPrimaryKey: true },
            { field: 'question', headerText: 'Question', type: 'string' },
            { field: 'created_at', headerText: 'Created', width: 100, format: 'dd/MM/yyyy' }
        ],
        height: 500,
        rowDataBound: function(args) {
            let currentId = args.data['id'];
            if (eventQuestionsIds.filter(function(e) { return e.pwquestionsId === currentId; }).length > 0) {
                selIndex.push(parseInt(args.row.getAttribute('aria-rowindex')));
            }
        },
        dataBound: function(args) {
            if (selIndex.length) {
                this.selectRows(selIndex);
                selIndex = [];
            }
        }
    });
    grid.appendTo('#Grid');

Regards,

Luis


3 Replies

NS Nithya Sivaprakasam Syncfusion Team June 6, 2022 05:24 PM UTC

Hi Luis,


Greetings from syncfusion support.


Currently, we are validating your query with provided information and we will update further details on June 8, 2022. We appreciate your patience until then


Regards,

Nithya Sivaprakasam.



NS Nithya Sivaprakasam Syncfusion Team June 8, 2022 06:00 PM UTC

Hi Luis,


Still, we are validating your query with provided information and we will update further details on June 9, 2022. We appreciate your patience until then


Regards,

Nithya Sivaprakasam.



NS Nithya Sivaprakasam Syncfusion Team June 9, 2022 01:42 PM UTC

Hi Luis,


Sorry for the inconvenience caused.


Query: “Error/Bug? when you have a GRId with allowRowDragAndDrop And a checkbox select column”


We checked your query and tried to replicate your reported problem at our end but it was unsuccessful. It is working fine on our end. So, before we start providing a solution to your query, we need more information for our clarification. Please share the below details that will be helpful for us to provide a better solution.

  • If possible please share the issue reproducible sample.
  • Please share the video demonstration of the reported issue.
  • Please share the version of the syncfusion package.


We have attached our sample code for reference.


Sample link: https://stackblitz.com/edit/7nfhlg-d2btiv?file=index.ts


Regards,

Nithya Sivaprakasam.


Loader.
Up arrow icon