Hi,
Currently, the new empty row is only opened when I press Enter Key. How can I open
the new row automatically after all the cell in the new row is filled that I have seen in your forum.Here is my javascript code.I want a new empty row to open on
exitededit mode. Please let me know how is this possible or if there is any other way to implement this. Also this javascript function is called each time I move from
one cell to other cell in the same row.Is there any possibility to call this function once I have done with all the cell on row insert in the same row?
function dgAllocationOnInsert_CellInserting_ExitedEditMode(sender, eventArgs) { var grid = $find("<%=dgAllocation.ClientID%>"); var gridBehaviors = grid.get_behaviors(); var row = gridBehaviors.get_selection().get_selectedRows().getItem(0); var rowId = -1; var allocTypeValue = ''; var fromType = eventArgs.getCell().get_row().get_cellByColumnKey("AL_ACCTTYPE").get_value(); allocTypeValue = eventArgs.getCell().get_row().get_cellByColumnKey("ST_NUM").get_value(); var year = document.getElementById('ctl00_ContentPlaceHolder1_baseLineYear').value; var cc_id = eventArgs.getCell().get_row().get_cellByColumnKey("CC_ID").get_value(); var cc_idBoolValue = cc_id != "null" && cc_id != null; var allocTypeBoolValue = allocTypeValue != "null" && allocTypeValue != null; var fromTypeBoolValue = fromType != "null" && fromType != null; var alTiming = eventArgs.getCell().get_row().get_cellByColumnKey("AL_TIMING").get_value(); var alTimingBoolValue = alTiming != null; var allocid = null; if (cc_id == "null") { alert("Select FromCC"); } if (allocTypeValue == "null") { alert("Select AllocationType"); } if (fromType == "null") { alert("Select FromType"); }
if (cc_idBoolValue == true && allocTypeBoolValue == true && fromTypeBoolValue == true && alTimingBoolValue == true) { abmAPI.updateAllocations(rowId, allocid, year, cc_id, eventArgs.getCell().get_row().get_cellByColumnKey("AL_ACCTTYPE").get_value(), eventArgs.getCell().get_row().get_cellByColumnKey("AL_ACCTPATTERN").get_value(), eventArgs.getCell().get_row().get_cellByColumnKey("AL_DESTPATTERN").get_value(), allocTypeValue, alTiming, updateAllocationsHandler); } }
Hello,
Thank you for contacting us.
If you enable the Activation the new row will be inserted when you fill the values in the new row and click on a cell in the grid.
The other way to add new row is just to add it from a button click. You can see this link:
http://help.infragistics.com/doc/ASPNET/2014.2/CLR4.0/?page=WebDataGrid_Row_Adding.html
Please let me know if I can provide any further assistance.
I'm just following up to see if you need any further assistance with this issue. If so please let me know.
Hi Nadia,
I made my grid to open a new empty row on the click of "Enter" currently which also saves the row in the grid and opens a new empty row.
Its working fine for me currently.
Thanks