PDA

View Full Version : Cannot bind value to grid selection if multiSelect is true



cnelissen
25 Apr 2014, 12:24 PM
Ext version tested:
Ext 5.0.0.736


Browser versions tested against:
Firefox 28 Chrome 34.0.1847.116


Description:
If you set multiSelect to true on a grid panel, you cannot bind a value to gridPanel.selection.


Steps to reproduce the problem:
Here is a fiddle that demonstrates the bug: https://fiddle.sencha.com/#fiddle/5cn


The result that was expected:
Button should be enabled when a selection is made on the grid.


The result that occurs instead:
The button is not enabled.

evant
25 Apr 2014, 2:05 PM
This probably isn't something we'll support, at least not on the selection property. The intended use for that is to refer to properties of a single record. Perhaps if the grid also published something like selectionCount or hasSelections.

cnelissen
28 Apr 2014, 10:14 AM
Perhaps if the grid also published something like selectionCount or hasSelections.

That would certainly work as well... I think the use case is fairly common, and the alternative can add quite a bit of code if you are dealing with lots of grids and lots of buttons.

Psychokrameur
16 Dec 2014, 2:45 AM
Apparently solved (Tested your fiddle with setting Ext. 5.1 Neptune)