Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
Row Selection Only Works Once
posted

Hello,

I am experiencing the same issue described in these topics:

https://es.infragistics.com/community/forums/f/ignite-ui-for-javascript/108260/iggrid-row-selector

https://es.infragistics.com/community/forums/f/ignite-ui-for-javascript/97078/iggrid-iggridselectionrowselectionchanged-only-fires-once

The grid allows me to make the first selection just fine. However, after the first selection, clicking on any other rows fails to change the selection.

When I change to cell selection, this issue does not occur. My features are:

{
        name: "Resizing",
        allowDoubleClickToResize: true,
        columnResized: function (evt, args) {
            // TODO Save column widths.
        }
},                  
{
    name: "ColumnMoving",
    columnMoved: function (evt, args) {
        var columns = $("#" + gridManager.gridKey).igGrid("option", "columns");
        gridManager.saveColumns(gridManager.layouts.selectedLayout, columns);
    }
},
{
    name: "Paging",
    type: "local",
    //pageIndexUrlKey: "pageNumber",
    //recordCountKey: "Data.TotalNumberOfRecords",
    //pageSizeUrlKey: "ItemsPerPage",
    pageSizeDropDownLocation: "inpager",
    pageSizeList: [25, 50, 100, 150, 200],
    pageSize: gridManager.getPageSize(),
    pageSizeChanged: function (evt, ui) {
        gridManager.savePageSize(gridManager.layouts.selectedLayout, ui.pageSize);
    },
    pagerRendered: function (evt, ui) {
        gridManager.defaultTableStyle(evt, ui);
    }
},
{
    name: "Sorting",
    type: "local",
    // sortUrlKey: "orderBy",
    // sortUrlkeyAscValue: "asc",
    // sortUrlkeyDescValue: "desc",
    columnSorted: function (evt, ui) {
        var columnSettings = $("#" + gridManager.gridKey).igGridSorting('option', 'columnSettings');
        gridManager.saveSorting(gridManager.layouts.selectedLayout, columnSettings);
    },
    columnSettings: gridManager.getSorting()
},
{
    name: "Filtering",
    allowFiltering: true,
    caseSensitive: false,
    mode: settingsService.getFilterMode(),
    columnSettings: [
        //{ columnKey: "ServiceAlertDate", allowFiltering: false },
    ],
    dataFiltered: function (evt, ui) {
        gridManager.saveFilters(gridManager.layouts.selectedLayout, ui.expressions);
    }
},
{
    name: "Selection",
    mode: "row",
    multipleSelection: false,
    cellSelectionChanging: function (evt, ui) {
        console.log("test");
    },
    cellSelectionChanged: function (evt, ui) {
   }
},
{
    name: "ColumnFixing",
    columnFixing: function (evt, args) {
        for (i = 0; i < $("#" + gridManager.gridKey).igGrid('rows').length; i++) {
            var row = $("#" + this.id).igGrid("rowAt", i);
            // even rows
            if (i % 2 === 0) {
                $(row).css("background-color", "#FFFFFF");
            }
            // odd rows
            else {
                $(row).css("background-color", "#F5F5F5");
            }
        }
    }
}

Possibly a related issue, if I click off of the grid anywhere (ex, the scrollbar), the selected row deselects.

I am using Infragistics 17.1. Is there a solution to this issue?

Parents
  • 0
    Offline posted

    Hello James,

     

    Thank you for posting in our community.

     

    After adding the settings you have send I was unable to reproduce the described behavior.

    I have tested the sample on Chrome and IE and used 17.1 version.

    I am attaching my sample for your reference. Could you please test it on your side and tell me whether or not it works as expected could help me identify the root cause for this matter.

    If this is not an accurate demonstration of what you are trying to achieve please feel free to modify my sample and send it back to me for further investigation.

    Also if you are using the cellSelectionChanging or cellSelectionChanged event in the Selection feature the mode should be “cell”, because otherwise it won’t fire. If the desired mode is "row" consider using rowSelectionChanging or rowSelectionChanged.

     

    Looking forward to hearing from you.

    Best Regards,

     Martin Kamenov

    Associate Software Developer

    Infragistics, Inc.

    4064.gridselection.zip

Reply Children