View Full Version : [OPEN] [OPEN-EXTJSIV-1812]beforeselect event on grid panel does not fire.

29 Apr 2011, 1:18 PM
The beforeselect event on the grid panel does not fire.

24 May 2011, 4:55 AM
bring forward.

25 May 2011, 4:58 AM
Is there a workaround for this? A missing beforeselect event is blocking my migration to ExtJs 4.


26 May 2011, 3:31 AM
// Allow the GridView to update the UI by
// adding/removing a CSS class from the row.
onSelectChange: function(record, isSelected, suppressEvent) {

var me = this,
views = me.views,
viewsLn = views.length,
store = me.store,
rowIdx = store.indexOf(record),
i = 0,
allowSelect = true;

for (; i < viewsLn; i++) {
if (isSelected) {

allowSelect = me.fireEvent('beforeselect', me, record, rowIdx) !== false;

if (allowSelect) {
views[i].onRowSelect(rowIdx, suppressEvent);
if (!suppressEvent) {
me.fireEvent('select', me, record, rowIdx);

} else {
views[i].onRowDeselect(rowIdx, suppressEvent);
if (!suppressEvent) {
me.fireEvent('deselect', me, record, rowIdx);

This workaround prevented only a visual select.

26 May 2011, 4:44 AM
I need a full working beforeselect. I also wonder why this event in no longer part of the RowSelectionModel. It's in the grid view.

beforeselect, select and after select must be implemented somehow. A row select changes the information state in an application. I use beforeselect for validation if any record on the screen is in edit mode. Then you get a pop up etcera....

I am really amazed that this isn't a blocking issue for other programmers. This migration to ExtJs 4 is getting me on my nerves....

26 May 2011, 6:41 AM
I feel the same.

5 Jun 2011, 1:13 PM
This is on top of the priority list for 4.0.2

5 Jun 2011, 10:05 PM
The fix has been merged in to 4.0.2. There is also a beforedeselect event that can be used to prevent the selection from leaving a row. These events apply to grid and dataview as well.

5 Oct 2012, 4:49 AM
It appears this is still not fixed in 4.1.2 ...