PDA

View Full Version : CheckBoxSelectionModel VS SelectionMode



aminef
9 Dec 2010, 1:11 PM
Basically when CheckBoxSelectionModel is set to SelectionMode.SIMPLE, it selects MULTI, and when it's set to SelectionMode.MULTI, it selects in SIMPLE (it works in the opposite way).
In the beginning I thought I did something bizarre in my code, but no I didn't and even in this example (http://www.sencha.com/examples/pages/grid/plugins.html) (the 2nd grid) you can see it after switching from "simple" to "multi"

sven
10 Dec 2010, 4:19 AM
I dont understand what you are saying. It works perfectly for me. You need to cleck on the ckeckbox to get multiply selection. If you click on the row, it acts as any other selectionmodel and you also need to use they keyboard.

aminef
10 Dec 2010, 6:24 AM
What I was saying is that when you choose (in the combo) the Multi mode, you cannot select many rows at the same time, but when you choose the Single mode, then you can, and even in my code I feel that the variables SelectionMode.SIMPLE and SelectionMode.MULTI are reversed.
please try again the sencha example and click on the grid to see that when it's on simple mode you can select as many as you want, and when you choose the multi one, you can choose only one.

sven
10 Dec 2010, 6:33 AM
It works as intended. You need to click the checkbox. If you click in the row, than you need to ctrl (like on windows or everywhere else).

aminef
10 Dec 2010, 6:37 AM
Well even when you click on the check box using the SINGLE mode, you can select as many as you can

like here : http://img576.imageshack.us/i/singleandmulti.jpg/

http://img576.imageshack.us/i/singleandmulti.jpg

sven
10 Dec 2010, 6:42 AM
There is no SINGLE mode. Its SIMPLE mode and that supports multiselection. If you really would use SINGLE mode, than it would not allowe multi selection

aminef
10 Dec 2010, 6:43 AM
I am so sorry for the confusion.... I got confused between Single and Simple... sorry about that!

sven
10 Dec 2010, 6:45 AM
No problem. Maybe we should add SINGLE mode also to the examples.

aminef
10 Dec 2010, 6:48 AM
yes probably, I was really confused and I am sorry about the thread. but the bottom line is : MULTI = SIMPLE + ctrl button? is that right?

sven
10 Dec 2010, 6:54 AM
SIMPLE means you can just click in the row and it gets added to the selection, regardless of holding the ctrl key.

aminef
10 Dec 2010, 6:55 AM
I see...
Thank you for you assistance again sven!