DataGrid Error in grouped Mode - onSelectedRowsChanged miss

I get this error when I change the selected item in a datagrid. I assume thats why I do not get the event onSelectedRowsChanged.
The onCellClick event works.

ERROR org.sablo.BrowserConsole - TypeError: Cannot read properties of undefined (reading ‘length’)
at DataGrid.onSelectionChangedEx (http://localhost:8183/default-src_ngcli … :142829:70)
at http://localhost:8183/default-src_ngcli … :142807:14
at http://localhost:8183/default-src_ngcli … :139890:28
at timer (http://localhost:8183/polyfills.js:2444:27)
at _ZoneDelegate.invokeTask (http://localhost:8183/polyfills.js:529:171)
at http://localhost:8183/vendor.js:29844:49
at AsyncStackTaggingZoneSpec.onInvokeTask (http://localhost:8183/vendor.js:29844:30)
at _ZoneDelegate.invokeTask (http://localhost:8183/polyfills.js:529:54)
at Object.onInvokeTask (http://localhost:8183/vendor.js:30158:25)
at _ZoneDelegate.invokeTask (http://localhost:8183/polyfills.js:529:54)
WARN org.sablo.BrowserConsole - 11:37:24 WARN DataGrid - select grouped record not supported yet

Which version of Servoy and NG Grids do you use? If you’re not using the latest NG Grids, do you see the issue also if you update it to the latest in the Servoy Package Manager?

I am using Servoy version 2023.12.2.3924 with the latest NG Grids 2023.12.2.

it seems this is the same as reported here: https://support.servoy.com/browse/SVY-18960
it is fixed in 2024.3

Thanks Gabi,
I tested it now with version 2024.3 and it worked.
To get the selected in grouped mode I use the function getGroupedSelection() of the grid - but how do I know that the grid is in grouped mode?

Another problem that I recognized is that the event OnSelectedRowsChanged() is not fired if I filter on a column.

to check if there is a grouping in the grid, you need to look into the column state:

	var columnStateObj = JSON.parse(elements.groupingtable_1.getColumnState());
	for(var i = 0; i < columnStateObj['columnState'].length; i++) {
		if(columnStateObj['columnState'][i].rowGroupIndex !== null) {
			application.output('grouped');
			break;
		}
	}

I did a quick check, and onSelectedRowsChanged is called on my side even if I filter a column using NG Grid’s column filter;
if it is not working in your solution, you should create a case in our support system ( https://support.servoy.com/ ) with a sample