I have a WebDataGrid, 11.1 that allows in cell editing. When the user hits the enter key to finish editing I woudl like to navigate to the next cell. Preferably I would like to be able to be able to control whether that is the next row or the next column.
Before I start getting involved in writing a lot of javascript to do this I was wondering if this is a built in behavior that I am not seeing how to configure or if there is a simple example of how to do it.
Thanks in advance.
Hi,
Thanks for your respone. But still i'm gettting the same error.
The Infragistics documentation does not show any argumanets to the constructor for the GridUtility object. Donig things this way worked for me:
var oUtility = sender._gridUtil;oUtility._grid = sender;
It seems a bit redundant, but it is working.
I passed the grid as an argument, but still i'm getting null error. how to solve this error?
function grdTool_CellEditing_ExitedEditMode(sender, eventArgs) { //var control = $find("grdTool"); //document.getElementById('grdTool');
///<summary> /// ///</summary> ///<param name="sender" type="Infragistics.Web.UI.WebDataGrid"></param> ///<param name="eventArgs" type="Infragistics.Web.UI.EditModeEventArgs"></param>
// Commit the changes to the server var oBehavior = sender.get_behaviors(); oBehavior.get_editingCore().commit();
// Move to the next cell var oCurrentCell = eventArgs.getCell();
// Make the new cell active var oUtility = new Infragistics.Web.UI.GridUtility('WebDataGrid1');
// Not sure why I have to set this property - it doesn't seem to be a documented property. oUtility._grid = sender;
var oNextCell = oUtility.getNextCellVert(oCurrentCell); oBehavior.get_activation().set_activeCell(oNextCell); }
Hi David,
I tried that script but it's not working for me. I entered data in first cell and press enter key, that data is committed. I placed that script within header part and i called it using
<CellEditingClientEvents ExitedEditMode="WebDataGrid1_CellEditing_ExitedEditMode" />
Hi Ivenkat,
You have to write custom java script in order to do this. Similar to what the poster had to do.
regards.
David Young