I would like to be able to add the activation behavior in a WebDataGrid's AddNewRowClientEvents-EnteringEditMode in javascript.
I'm trying this code, but I it does not recognize Infragistics.Web.UI.Activation().
function enteringEditMode(sender, args) { var instanceVar = new Infragistics.Web.UI.Activation(); sender.get_behaviors().add(instanceVar); }
I would appreciate any help you can offer.
Thanks.
Hello djacobson ,
You cannot add a behavior on the client side. Behaviors can only be enabled and created on the server.
Please note our help page regarding WebDataGrid behaviors:
http://help.infragistics.com/NetAdvantage/ASPNET/2011.1/CLR4.0/?page=WebDataGrid_Behaviors.html
As stated: “The control loads only the client-side javascript for the behaviors that are added on the server-side (pay to play model).”
Let me know if you have further questions regarding this issue.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://www.infragistics.com/support
Thanks for your response.
What is the proper way to do batch updates on thw WebDataGrid?
I turned off Activation in order to "delay" the RowUpdating event until the user clicks on the Save button. But now the tab key does not work on the Add New Row row.
According to http://community.infragistics.com/forums/t/35865.aspx Infragistics is working on the BatchUpdate feature in v11.2. Any idea when v11.2 will release?
Thanks again.
The 11.2 release has been scheduled for the end of October around the 21st.
I have a possible solution for your scenario although I’m not sure if it would be very convenient.
You could cancel the RowUpdating event if "Save" button is not the cause for the postback.
This way you can save the changes to the server only once you hit the “Save” button and you can keep the activation behavior. The downside to this is that it still triggers an async request to the server upon changing the active cell. I’m attaching a sample with this.
Let me know if you I can further assist you in any way.
I'm just following up to see if you might need further assistance regarding this.
If so don't hesitate to contact me.