Brian
Brian

Reputation: 5028

how to make multiselect to singleselect in extjs?

Take a look at this example. Here you can see multiselect field that allows user to select multiple rows by pressing CTRL key down.

enter image description here

I have tried to use the keyUp function to capture the CTRL key, in order to somehow prevent user from selecting more than 1 row. But I am not sure hot to do this with mulitiselect xtype.

You might think way would I want a single select instead of multiselect, it is just something I need for my app I am working on. I like the layout of the example and want to keep the structure the same. The only thing I want to change is from multi -> single.

Thanks for any help.

Upvotes: 0

Views: 2662

Answers (1)

radtad
radtad

Reputation: 189

The following config needs to go in your multiselect config. This will set the config for the boundList which is where the multiselect is.

listConfig: {
    multiSelect: false
}

Upvotes: 1

Related Questions