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
2745
[Bug]: Input control in header with sorting enabled
posted

I am trying to create my own columns with a checkbox in the header so the user can opt to select all items in a column with ease.  The problem is the click event is not registered on the checkbox because it is wrapped in a hyperlink for sorting.  Sorting is disabled for that column so the event should propagate but it does not.

$(".selector").igGrid({
    autoCommit: true,
    autoGenerateColumns: false,
    renderCheckboxes: true,
    columns: [
        { key: "Name", dataType: "string", headerText: "Full Name" },
        { key: "IsActive", dataType: "bool", headerText: "<input type=checkbox /> Is Active?" }
    ],
    features: [
        { name: "Sorting", columnSettings: [
                { columnKey: "Name" },
                { columnKey: "IsActive", allowSorting: false }
        ]}
    ],
    dataSource: data
});

I found that the issue stems from the "_create" method in "infragistics.ui.grid.sorting.js" where it calls "self._handleSort" function.  The if condition does not check the column header if sorting is enabled.  If it did that then I wouldn't have this problem.  Another work around is not to render the hyperlink if sorting is disabled, but there are certain scenarios where I would want to toggle sorting based on certain conditions.

I've attached a screenshot of my grid.  The checkbox columns and Priority 'N' columns are dynamic based on the data.  The user will manipulate the priorities using controls above the grid to add, delete or shift priorities.  They want it in this view but I at the moment I cannot give the ability to mass select a column with sorting enabled.

Thanks,

Parents Reply Children
No Data