If the grid has Selection and Updating, setting the startEditTriggers doesn't work. Only double-clicking will work to initiate edit mode. Click or F2 will not.
grid.igGrid( { columns: buildColumns(), features: [ { name: "Sorting", type: "local" }, { name: "Selection", mode: "cell", multipleSelection: false, activation: true, cellSelectionChanged: function (evt, ui) { var actualRowIdx = ui.cell.row[0].rowIndex - 1 // rowIndex is not zero based (and varies both on naming standard and zero-base depending on which event is being used [good times indeed]), but methods expect a zero-based index if (ui.cell.columnKey === 'NextRound') { var myCell = grid.igGridSelection('getCellValue', actualRowIdx, 'NextRound'); var dataview = grid.data('igGrid').dataSource.dataView(); var myVal = dataview[actualRowIdx]["NextRound"]; grid.igGridUpdating("setCellValue", actualRowIdx, 'NextRound', !(myVal)); dataview[actualRowIdx]["NextRound"] = !(myVal); grid.igGridSelection('deselectCell', actualRowIdx, ui.cell.index); grid.igGridUpdating('endEdit'); grid.igGridSelection("clearSelection"); } else { // grid.igGridSelection('selectCell', actualRowIdx, ui.cell.index ); grid.igGridUpdating('startEdit', actualRowIdx, ui.cell.index); } } }, { name: 'Updating', editMode: 'cell', enableAddRow: false, enableDeleteRow: false, validation: true, startEditTriggers: 'click,dblclick,enter', editCellEnded: function (evt, ui) { //NOTE: editCellEnded likes attention, it also likes to fire when entering edit mode on a cell }, editCellEnding: function (evt, ui) { //TODO: check valid value (number, not used previously, not more than # of competitors) & return false with alert if not ok if(ui.value!='' && isNaN(ui.value)){ alert('Not a valid scoring number'); //evt.stopPropagation(); evt.stopImmediatePropagation(); evt.preventDefault(); return false; //NOTE: see the mighty "editCellEnding" in action, its event propagation is unstoppable
} } }], width: "100%", dataSource: CompetitionRound.RoundCompetitors, autoGenerateColumns: false, renderCheckboxes: true });
I should've wrote that I tried each individually as well. Neither click or F2 works by themselves, and enter by itself results in the selected row dropping one down and then entering edit mode. Sorry I wasn't more clear initially.
So Selection overrides the single-click option by design? Looking at KendoUI, Telerik's RADGrid, jqGrid and quite a few others (especially lately given that I can't go a solid day using igGrid without running into a major issue), I haven't found any grid that behaves like that. If I turn "click" on, I should be able to click to select the row (if I have row specified) and enter edit mode on the cell selected automatically - click to edit should obviously override selection. Surely clicking then clicking again can't possibly be by design, that would be crazy. I had thought it was just a poor result of having different developers work in silo's for each behavior as someone from Infragistics commented on recently in the forum regarding the different naming conventions used in each separate behavior (Selection, Updating, Sorting, etc...). It seems like the different behaviors don't really take each other into account.
Can you provide any sort of hint where Infragistics is going with the jQuery igGrid? I'm at my wit's end with all the problems I've been facing - aside from the few days I took off, multiple tickets have been opened relating to issues I've reported, as well as explanations that what should be common (and is in other competing grids) simply isn't in igGrid. Things like header styling (differing justifications, etc...), events misfiring or unable to be canceled, hidden columns throwing multiple things off, having to click 3 times to check a checkbox (again because behaviors don't cooperate), inability to enter edit mode easily/reliably, keyboard navigation not working, etc... In addition to needing to wrap up what should have been a quick piece of a project, I need to decide whether sticking with it is feasible or if I need to move to another grid/company. It seems like the most recent releases have been feature oriented rather than stability or documentation improvements, and those features don't always work well together (regression tested?). I've been with Infragistics for well over 10 years, but the last couple have been staggeringly difficult to endure.
Hi,
First you didn't define F2 in startEditTriggers so it is normal not to work.
When you define 'click' and 'dblclick' at the same time only the 'dblclick' works. I believe this is by design, because I couldn't find bug on the subject and this behavior dates back in 11.1.
When you use Updating and Selection together and you have defined 'click' as startEditTrigger you first need one click to make the selection and then you need second click to start editing. This is by design.
Hope this helps,
Martin Pavlov
Infragistics, Inc.