jQuery UI Widgets Forums Grid Disabling Checkbox in Grid

This topic contains 9 replies, has 3 voices, and was last updated by  Hristo 7 years, 4 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • Disabling Checkbox in Grid #95589

    SC
    Participant

    Hello

    I’m using Selectionmode: ‘checkbox’ in jqxGrid. Can you provide me with an example of how I can make certain checkboxes unselectable based on a passed in variable?

    Disabling Checkbox in Grid #95592

    Hristo
    Participant

    Hello SC,

    I would like to suggest you look at this workaround:
    https://www.jseditor.io/?key=jqxgrid-disable-row-checkbox

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Disabling Checkbox in Grid #95630

    afrath
    Participant

    Hi

    I create a grid with filter ,

    1. rendered all the data in grid . and i clicked a cell in the grid based on the cell value i looped though all rows and checked that cell value is equal to the all the rows value if matches i checked all the rows with the matching value.
    $(“#jqxgrid”).on(‘cellclick’, function (event) {
    var editrow;
    var isChecked = false;
    var column = event.args.column;
    var rowindex = event.args.rowindex;
    var columname = event.args.datafield;
    editrow = rowindex;

    if (columname == “Sender”) {
    var dataRecord = $(“#jqxgrid”).jqxGrid(‘getrowdata’, editrow);

    var rows = $(‘#jqxgrid’).jqxGrid(‘getrows’);
    if ($(‘#jqxgrid’).jqxGrid(‘getselectedrowindexes’).length > 0) {
    $(‘#jqxgrid’).jqxGrid(‘clearselection’);
    isChecked = true;
    }
    for (var i = 0; i < rows.length; i++) {
    if (rows[i].Sender === “AAA” && !isChecked) {
    $(‘#jqxgrid’).jqxGrid(‘selectrow’, i);
    }
    }

    }
    });
    The above code is working based on my requirment toggle and detoggle.

    2. ISSUE IS
    if we applied the filter and we click the cell
    the above code is not working. not working means the row is not selecting and deselecting.

    Disabling Checkbox in Grid #95634

    afrath
    Participant

    if cell sorting applied for the grid then the checkbox selection and deselection is not working based on the logic
    $(‘#jqxgrid’).jqxGrid(‘selectrow’, i);

    Disabling Checkbox in Grid #95644

    Hristo
    Participant

    Hello afrath,

    Could you clarify it?
    What are you want to achieve?

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Disabling Checkbox in Grid #95663

    afrath
    Participant

    i need to check the selection checkbox is active or not? using any selectors?

    i have a table with rows

    checkbox(selection for multiple), patient,invoice

    example if we click patient name in the grid need to select all the patient name with same name , if click again same patient name it deselect ,e if toggle method.

    for this i need to identify checkbox is active or not like this..

    if ($(this).find(“input[type=’checkbox’]”).filter(‘[patientname=”‘ + patientname + ‘”]&&[sender=”‘ + sendername + ‘”]’).prop(“checked”))
    {
    (this).find(“input[type=’checkbox’]”).filter(‘[patientname=”‘ + patientname + ‘”]’).prop(‘checked’, false);
    }
    else
    {
    }
    i need the above functionality in jqxgrid
    }

    Disabling Checkbox in Grid #95668

    Hristo
    Participant

    Hello afrath,

    I would like to suggest you another option, it will be better to use another widget that has suitable hierarchical functionality for this purpose – jqxTreeGrid.
    Please, take a look at this example:
    http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtreegrid/javascript-tree-grid-hierarchical-checkboxes.htm?light

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Disabling Checkbox in Grid #95691

    afrath
    Participant

    Hi need jqgxrid and checkbox in front for multiple selection. so anyway to possible to find row is checked or not??

    Disabling Checkbox in Grid #95692

    afrath
    Participant

    because jqxgrid gives the my remaining requirements

    Disabling Checkbox in Grid #95776

    Hristo
    Participant

    Hello afrath,

    You could try to use getselectedrowindexes method of the Grid for this purpose.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.