We're using an igGrid (currently v12.1) applied to a <table id="dropDown"> element inside a <div> as the drop-down for a custom comboBox:
$("#dropDown").igGrid({ autoGenerateColumns: false, dataSource: myDataSource, primaryKey: myPrimaryKey, columns: myColumnHeaderInfo, // This has some hidden columns width: "100%", height: "100%", autofitLastColumn: true, autoFormat: true, caption: "Drop-down Caption", tabIndex: -1, features: [ { name: 'Selection', mode: "row", rowSelectionChanged: gridMainTable_RowSelectionChanged } , { name: "Sorting", type: "local" } , { name: 'Resizing' } ] });
During the keyDown event on an <input>, pressing the "down" key (keyCode = 40) increments the selected row index:
var row = $("#dropDown").data("igGrid").selectedRow(); $("#dropDown").igGridSelection("selectRow", row.index + 1);
This selects the proper row, but does not fire the rowSelectionChanged event (handled by gridMainTable_RowSelectionChanged).
Are we doing something wrong or is this behavior as-designed? Is there a better way to do this?
Hi,
Ignite UI API methods do not rise events by design. You should manually execute the code in the event, when you call an API method.
Best regards,Martin PavlovInfragistics, Inc.
So the events are only fired on the UI-level (mouse-click, down-arrow, etc.)? The event is triggered on those types of actions, just not when we perform the same action via JavaScript (via the API)?