Results 1 to 5 of 5

Thread: Want to select rows without selecting checkboxes in CheckboxSelectionModel

  1. #1

    Default Want to select rows without selecting checkboxes in CheckboxSelectionModel

    Hi,


    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.

    Regards,
    Anirban.

  2. #2
    Sencha Premium User krullj's Avatar
    Join Date
    Sep 2011
    Posts
    123
    Answers
    5

    Default

    Try adding the following config to your selection model:
    Code:
    checkOnly: false

  3. #3

    Default it didn't work

    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?

  4. #4
    Sencha Premium User krullj's Avatar
    Join Date
    Sep 2011
    Posts
    123
    Answers
    5

    Default

    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.

  5. #5

    Default

    Ok thanks a lot krullj, will try it out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •