Author Topic: grid with Selection Mode Single has check box  (Read 5706 times)

Soumya

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 23
    • View Profile
grid with Selection Mode Single has check box
« on: December 18, 2014, 02:41:35 am »
Hi Param,

I have grid whose selection Mode is  selectionModel: { type: 'row', cbHeader:false, mode: 'single' },

I have check box with cb header false

 title: "Select", dataIndx: "Transition", width: 50, editable: false,align: "center", type: 'checkBoxSelection', cls: 'checkboxColumn', resizable: false,
        cb: { all: true, header: false }

I was able to select single row at a time on check box click . I check the box on row 1 and the entire row's get selected which is what i need. Now i select second row 2 which deselects previous row 1 but the check box still stays checked .

I am trying to achieve Single row selection using checkbox. It used to work before i upgraded to 2.3.0.

Please provide some insight.

thanks

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: grid with Selection Mode Single has check box
« Reply #1 on: December 18, 2014, 09:55:07 pm »
Selections have been decoupled from checkboxes to support multiple checkbox columns in 2.3.0

You can solve your use case by listening to rowSelect and rowUnSelect events

Code: [Select]
                ui.rowData[ "Transition" ]=true / false;
                grid.refreshCell({rowIndx: ui.rowIndx, dataIndx: "Transition" });

Soumya

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: grid with Selection Mode Single has check box
« Reply #2 on: December 20, 2014, 01:59:12 am »
Thank you very much that solved my problem.

almeida

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: grid with Selection Mode Single has check box
« Reply #3 on: August 01, 2018, 12:08:23 am »
Hello. How to achieve the same behavior in 2.4.1? Implemented rowUnSelect event and rowSelect, but it doesn't work. Thanks