I am using RowEditingTemplate for Editing. Now I wanto to use the same template to add row using the RowAdding enabled.
It seems to work with F2 enabled. When I press F2 the template shows up but when I clik OK, the values are passed to the Row, but I the grid is not updating and the new row is not being added.
Can you provide me acript to force the row to be added when I cloe the templatein rowadding?
Regards,
Edson
Hello Edson ,
I’m just following up to see if you’ve been able to resolve your issue. If you have any questions or concerns or if you need further assistance please let me know.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support
Thank you for posting in our forum.
You could manually open the row edit template for any row including the adding row. For example like this:
function OpenEditTemplate() {
var grid = $find("WebDataGrid1");
var addingRow = grid.get_behaviors().get_editingCore().get_behaviors().get_rowAdding().get_row();
grid.get_behaviors().get_editingCore().get_behaviors().get_rowEditingTemplate().enterEditMode(addingRow);
}
It may be more convenient to call this method on some event. For example you could hook it on click of the selector in the adding row.
To add the row you could handle the client side TemplateClosed event and in it get the text from the adding row and add manually a new row with that text.
For example refer to the attached sample. Click on the selector in the adding row. It’s the one that contains the “+” image. That will open the template for the adding row. Apply some changes and click ok. That will add the row to the grid.
Let me know if you’re trying to achieve something similar.
Developer Support Engineer II