Hi,
It would be nice if the iggrid extension exposes an observable array of selected rows (items).
We've started to create an implementation to do this, although it would be better if it could be included in the standard iggrid-knockout-extension.
ko.bindingHandlers.igGridSelection = { init: function (element, valueAccessor, allBindingsAccessor, viewModel) { var selectedRowsArray = valueAccessor(); // By ref ? var dataSource = allBindingsAccessor().igGrid.dataSource; $(element).bind('iggridselectionrowselectionchanged', function (evt, ui) { selectedRowsArray.removeAll(); var rows = ui.selectedRows; for (var i = 0; i < rows.length; i++) { var index = rows[i].index; selectedRowsArray.push(dataSource()[index]); } }); $(element).bind('iggridsortingcolumnsorting', function (evt, ui) { selectedRowsArray.removeAll(); }); } };Currently the 'iggridselectionrowselectionchanged' event is only raised when adding rows to the selected rows list.We've opened a discussion on this forum to have the event also raised when deselecting, this would make it much easier to implement the selected rows in the knockout extension. Greetings,Christophe
Hello Christophe,
Thank you for your suggestion.
We will research this possibility and inform you what further actions will be taken regarding it.
After discussing this feature with our R&D team I can inform you that this feature can be considered as a Product Idea.
I have sent your Product Idea directly to our product management team.
Our product team chooses new product ideas for development based on popular feedback from our customer base.
If your Product Idea is chosen for development, you will be notified at that time.
Your reference number for this product idea is PI12060122.
If you would like to follow up on your Product Idea at a later point, you may contact Developer Support management via email.
Please include the reference number of your Product Idea in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com
Thank you.
PLUS ONE!