Hi there,
I'm using latest release and binding my grid from java script. I have a two same issue on all my grids.
1. When I'm adding new row and before clicking update button if I click outside new row (any row in the grid) it close the new adding row and I lost all my entered information.
I found same thing on your API:
http://es.infragistics.com/products/jquery/sample/grid/row-adding-api
My requirement is that I don't want to close the expanded new row if I click outside on the grid.
Please advise any help. I tried some things like below in editRowEnding event:
if (ui.rowAdding == true && ui.update == false) { evt.preventDefault(); }
2. When I added new row successfully, It always show new added row at the bottom current grid page. Is there anyway if I want to show that at the top (first row of grid)
Regards,
Jasdeep
Hi,
I managed to fix my first issue with this:
function editRowEnding(evt, ui) { if (ui.rowAdding == true && ui.update == false) { if (evt.currentTarget.title == "Stop editing and do not update") return false; else ui.keepEditing = true; } else {
// adding row code
}
Still looking advise for point 2 from above post.
Hello Jaseep,
Great job about fixing yourself the first issue!
Now on the second issue...
You can detach the last row from the html DOM and then reattach it again on the first position of the grid. You should keep in mind the zebra styles of the grid.
Also the records in the data source will be appended to the data, so you should also delete and then insert the new record at the right position in the data source.
I'm attaching a sample which demonstrates this approach.
Hope this helps,Martin PavlovInfragistics, Inc.