jQWidgets Forums

jQuery UI Widgets Forums Lists DropDownList whole grid values turning into blue when I click on dropdown

This topic contains 2 replies, has 3 voices, and was last updated by  jakubanowakowski 2 years, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

  • Sandy422
    Participant

    Hi,

    When I Click on Dropdown to select value, the whole grid values and Column names turning into green. Clearly the whole grid selecting.
    I have tried the way by changing properties , but Didn’t find an issue, Please need some help.

    Here is my Code:
    var nestedGridAdapter = new $.jqx.dataAdapter(srcDetails);

    if (grid != null) {
    grid.jqxGrid({
    source: nestedGridAdapter,
    width: ‘80%’,
    height: 250,
    sortable: true,
    pageable: true,
    theme: ‘classic’,
    filterable: true,
    groupable: false,
    editable: true,
    autoheight: false,
    selectionmode: ‘checkbox’,
    editmode: ‘click’,
    columns: [

    {
    text: ‘Dropdown’, datafield: ‘Code’, width: ‘18%’,
    displayfield: ‘Name’, columntype: ‘dropdownlist’, type: ‘string’,
    createeditor: function (row, value, editor) {

    editor.attr(‘rowId’, row);
    editor.addClass(‘class’, ”);
    editor.jqxDropDownList({ source: Adapter, theme: “classic”, enableSelection: true, displayMember: ‘DisplayName’, valueMember: ‘Code’, autoDropDownHeight: true });

    editor.bind(‘change’, function (event) {
    if (event.args.item) {
    var selectedRowIndex = parseInt(editor.attr(“rowId”));
    if (confirm(“are you sure, you want to change a name?”))
    {
    var indexs = grid.jqxGrid(‘selectedrowindexes’);

    //add current select row if no checkboxes selected
    if (indexs.length === 0) {
    indexs.push(selectedRowIndex)
    }
    var eanName = [];
    for (var i = 0; i < indexs.length; i++) {
    var rowData = grid.jqxGrid(‘getrowdata’, indexs[i]);
    grid.jqxGrid(‘setcellvalue’, indexs[i], ‘Name’, event.args.item.label);
    var eanDetails = { EAN: rowData.EAN, Code: event.args.item.value };
    eanName.push(eanDetails);
    }
    sendMail(eanName, event.args.item.value);
    }
    event.preventDefault();
    }
    });
    }
    ,
    initeditor: function (row, cellvalue, editor, celltext, cellwidth, cellheight) {
    editor.jqxDropDownList(‘open’);
    }
    }
    ]
    });
    Thanks,
    Sandy


    Hristo
    Participant

    Hello Sandy,

    Please, clarify your case.
    What do you want to achieve?
    If you want to change the style of the whole row which is edited then you could try this demo:
    https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/editrowsrendering.htm?light
    I hope this will help.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com


    jakubanowakowski
    Participant

    I have similar issue

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

You must be logged in to reply to this topic.