The Infor Communities is globally accessed system by Infor and its customers, please do not post or upload any content that could be deemed as sensitive, confidential or subject to any data regulation requirements. If you are unsure whether or not the content contains sensitive, confidential or has any data regulation requirements, please seek the advice of your internal security, legal, and compliance experts.

Infor M3H5 - Disable multiselect on list (datagrid)

Hi,

How to disable multiselect on M3H5 list (datagrid) and set it to be single row selection? I’ve try to do the following setting in my script however it doesn’t work. When user hold CTRL + select on row or Shift + click on row, with the following setting user still able to do multiselect (multiple selected rows are highlighted).

ExampleCode.prototype.run = function () {
var _this= this;
var grid = this.controller.GetGrid();
grid.setOptions({ multiSelect: false }); // to disable multiselect
var handler = function handler(e, args) { _this.onSelectionChanged(e, args); };
grid.onSelectedRowsChanged.subscribe(handler);
this.attachEvents(this.controller);
};

What I want to achieve is :
When user hold CTRL + select on row / Shift + click on row, there is always one row is being selected (this.controller.GetGrid().getSelectionModel().getSelectedRows() only show one item in its return array) and only one row (the selected row) being highlighted.

Can anyone help me on this? Thanks in advance.

Parents
  • If a datagrid supports multi-select or not is something that you set when creating the grid and initializing it. I'm not sure that you can change that behavior once the grid is created. The grid options object that you are setting has already been set and it needs a bunch of properties.

    May I ask what the usage scenario is?

  • Hi Karin,

    I'm trying to apply a control on option 'Change' in OIS101/B1. When user select on a record in datagrid and press 'Change' option, the script will run through some validation. If the select record highest status (Hi column in grid) is equal to 22, then user should be prompt by an error dialog and stay on panel B1, else user will be navigate to panel E.

    The problem is in M3, once multiple select and press 'Change', it will go into panel E and once enter it can go to next record (item line) without returning back to panel B1.

    So, if the first selected record (item line) validated OK (valid), then it will go into panel E, once in panel E, every enter will go into next selected record, so this will defeat the purpose of having the validation.

Reply
  • Hi Karin,

    I'm trying to apply a control on option 'Change' in OIS101/B1. When user select on a record in datagrid and press 'Change' option, the script will run through some validation. If the select record highest status (Hi column in grid) is equal to 22, then user should be prompt by an error dialog and stay on panel B1, else user will be navigate to panel E.

    The problem is in M3, once multiple select and press 'Change', it will go into panel E and once enter it can go to next record (item line) without returning back to panel B1.

    So, if the first selected record (item line) validated OK (valid), then it will go into panel E, once in panel E, every enter will go into next selected record, so this will defeat the purpose of having the validation.

Children