View Full Version : Want to select rows without selecting checkboxes in CheckboxSelectionModel

30 Mar 2013, 8:04 PM

I am using CheckboxSelectionModel to select a row. In that, the row gets selected when I click the checkbox, or when I click on the row, the checkbox gets selected (if I use the attribute checked : false). But my requirement is that when I will click on any value of the row, the row will get selected but the checkbox will not get checked. I mean, it will only highlight the row. Can anyone kindly suggest me how to achieve this? We cannot use RowSelectionModel as my selection model, as in that case, the checkbox will no longer appear.


30 Mar 2013, 9:43 PM
Try adding the following config to your selection model:

checkOnly: false

31 Mar 2013, 4:44 AM
If I add checkOnly : false, the checkbox gets checked if I select the row. But I want to select the row without selecting the checkbox. My requirments are :

1. Checking the checkbox will select the row. This is achieved using CheckboxSelectionModel
2. Clicking on the row will select/ highlight the row.

We were unable to achieve the second. Can you kindly suggest how to do it?

31 Mar 2013, 5:18 AM
Ah, okay. I see now. I was confused about the second objective you have.

I believe you're going to have to implement a solution without using the CheckboxModel. The selection of rows is tied to the checkbox with this selection model, so you'll want to use the usual RowModel. After you have your row selection working as you want, you'll probably want to inject your own checkbox column using a new column with a renderer to generate the checkbox html.

31 Mar 2013, 6:25 AM
Ok thanks a lot krullj, will try it out.