This question is locked. New answers and comments are not allowed.
Billy McCafferty
Top achievements
Rank 1
Billy McCafferty
asked on 13 Apr 2010, 12:25 AM
Hello,
I'm using the Grid in Ajax mode and trying to edit inline. I have some CSS formatting applied during .ClientEvents.OnDataBound which is being lost after I click the Cancel button during inline editing. Is there a way that I can listen for, and handle, the click of the Cancel button so I can reapply my CSS formatting?
Thank you,
Billy McCafferty
I'm using the Grid in Ajax mode and trying to edit inline. I have some CSS formatting applied during .ClientEvents.OnDataBound which is being lost after I click the Cancel button during inline editing. Is there a way that I can listen for, and handle, the click of the Cancel button so I can reapply my CSS formatting?
Thank you,
Billy McCafferty
4 Answers, 1 is accepted
0
Hello Billy McCafferty,
There was indeed a problem with the cancel event not calling rowDataBound. I suggest you check the build attached in this forum thread which should address this problem.
Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
There was indeed a problem with the cancel event not calling rowDataBound. I suggest you check the build attached in this forum thread which should address this problem.
Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Billy McCafferty
Top achievements
Rank 1
answered on 13 Apr 2010, 05:20 PM
Atanas,
After dropping in the latest DLLs and JS files from the post you referenced, the problem is still not resolved.
To replicate:
1) Create a Ajax bound Grid with commands of Edit and Delete
2) Set the client events to be as follows:
.ClientEvents(events => events
.OnDataBinding("alert('OnDataBinding')")
.OnDataBound("alert('OnDataBound')")
.OnLoad("alert('OnLoad')")
.OnRowDataBound("alert('OnRowDataBound')")
3) Click "Update" on a row (no events will fire)
4) Click "Cancel" on the row (no events will fire)
I'm expecting to be able to listen for an event upon Cancel to re-apply client-side formatting. Thank you for looking into this.
Billy McCafferty
0
Billy McCafferty
Top achievements
Rank 1
answered on 13 Apr 2010, 06:22 PM
Incidentally, no client event is raised after clicking and confirming the Delete button either. This would be a useful method to tie into for displaying dynamic page messages.
Billy McCafferty
0
Hi Billy McCafferty,
Could you verify the upgrade has been correctly applied? Check the assembly version of Telerik.Web.Mvc.dll in the references node in solution explorer. Alternatively check which version of the JavaScript file is being included by inspecting the output of your page.
I double checked and the following line
.trigger(this.element, 'rowDataBound', { row: $tr[0], dataItem: dataItem }); is called at the end of the cancelRow JavaScript routine which is found in telerik.grid.editing.min.js
Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Could you verify the upgrade has been correctly applied? Check the assembly version of Telerik.Web.Mvc.dll in the references node in solution explorer. Alternatively check which version of the JavaScript file is being included by inspecting the output of your page.
I double checked and the following line
.trigger(this.element, 'rowDataBound', { row: $tr[0], dataItem: dataItem }); is called at the end of the cancelRow JavaScript routine which is found in telerik.grid.editing.min.js
Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.