Hello,
Inline Edit Action does not respond to click. The following JavaScript error occurs:
ReferenceError: event is not defined.
JavaScriptdxo.CustomButtonClick.AddHandler(
function(s, e) {
if(!s.XafGridViewUpdateWatcherHelper || s.XafGridViewUpdateWatcherHelper.CanProcessCallbackForGridAction(e.buttonID)){
event.cancelBubble = true;
var index = e.visibleIndex - s.pageRowCount * s.pageIndex;
var postBackArgument = 'XafAction:' + e.buttonID + ':' + s.stateObject.keys[index];
var confirmationMessage = s['cpCnfrm_' + e.buttonID][e.visibleIndex];
var isPostBackRequired = s['cpPostBackRequired_' + e.buttonID];
RaiseXafCallback(globalCallbackControl, 'Vertical$v1_29573584$LE_v1', postBackArgument, confirmationMessage, isPostBackRequired);
}
});
I have reproduced this issue. Our developers will research it further. We will do our best to find a solution in the shortest possible time.
We have found a workaround - you can remove the problematic line from the client-side script. To do this, add the following controller to your Web module:
public class InlineEditController : ViewController<ListView> { ASPxGridListEditor editor; protected override void OnViewControlsCreated() { base.OnViewControlsCreated(); editor = View.Editor as ASPxGridListEditor; if (editor != null && editor.ContextMenuTemplate is ASPxGridViewContextMenu) { ((ASPxGridViewContextMenu)editor.ContextMenuTemplate).ControlsCreated += InlineEditController_ControlsCreated; } } void InlineEditController_ControlsCreated(object sender, EventArgs e) { editor.Grid.Load += new EventHandler(grid_Load); } void grid_Load(object sender, EventArgs e) { editor.Grid.Load -= new EventHandler(grid_Load); string script = editor.Grid.ClientSideEvents.CustomButtonClick; if (script.Contains(RenderHelper.EventCancelBubbleCommand)) { script = script.Replace(RenderHelper.EventCancelBubbleCommand, ""); script = script.Replace("var index = e.visibleIndex - s.pageRowCount * s.pageIndex;", "var pageIndex = s.pageIndex != -1 ? s.pageIndex : 0; var index = e.visibleIndex - s.pageRowSize * pageIndex;"); editor.Grid.ClientSideEvents.CustomButtonClick = script; } } protected override void OnDeactivated() { base.OnDeactivated(); if (editor != null && editor.ContextMenuTemplate is ASPxGridViewContextMenu) { ((ASPxGridViewContextMenu)editor.ContextMenuTemplate).ControlsCreated -= InlineEditController_ControlsCreated; editor = null; } } }
Hello,
I added the new controllet but now I have the error attached.
I hope you can help me with this issues.
Thanks,
Rossano
…the error is generated when I click on the inline action.
We also implemented your controller and it works on all list views except for one. The existing script in the CustomButtonClick event is an empty string on this one view so nothing is replaced.
I then modified your controller to also run the replacement text before rendering and that allows the edit button to work the first time the page is loaded, but subsequent loads do not work. This listview works correctly in 15.2.4.
Any idea why this may be happening? I will start combing through the controllers to see if we are affecting the editor elsewhere.
Dave, I have updated the controller so that it catches more precisely the moment when the script is created. Please check if the updated controller works in your scenario. It should also fix the issue reported by Rossano.
Hello,
I have updated the controller but I have the same issue.
When I click on a custom button (implemented with a SimpleAction in RecordEdit and RequireSingleObject) I have the same error.
I hope you can help me with this issue.
Thanks,
Rossano
We cannot reproduce this issue on our side. Please provide a sample project where it can be reproduced. In addition, it would be nice if you do this in the ASPxGridListEditor - The inline "Edit" action cause an exception after switching grid pages ticket that is directly related to this issue to avoid mixing the errors' discussion.
Hello Anatol,
the Controller works fine for the paging Problem. But it does not solve the Firefox GridView Edit Record button Problem. I've installed the current Version of Firefox, there is still no effect if you click on the Edit Symbol in the line. In IE,Chrome and Edge it works fine. Do you have a time line, i'm working currently with 15.2.5, but I have to roll it back if there is no hotfix or workarround in a view days.
Best Wishes
Thomas
Our fix will be similar to the proposed workaround. So, if the workaround does not work in your case, the fix will not work either. We need to understand why the solution does not work in your project. Please provide a sample project and the error details. You can see them using the browser's Development Tools (F12).
Hi Anatol,
thank you for your Feedback.
I've applied the suggested Controller to my Project in module.web Sub Project. the Controller is triggered, in IE or edge every thing is ok. "Only" in Firefox the inline edit button is not working. I've attached a 7zip file with a screenshot of the controller class I've copied into my project and a debug screenshot of the edit button in Firefox (F12).
I hope this will help you to find the problem.
Thank you.
thomas
Do you have any News?
By the way, I've applied the work arround to another Project, there it is NOT working, If I'm on the last page, I can still not open a record. The Controller is trigered, but it is not helping.
From my Point of view it's best for me to go back to the initial 15.2.4 without any hotfix and apply only the gridview filter performance workarround, newer versions/hotfixes are containg even more bugs i.e. theme parsing error etc… cna you confirm?
Best Wishes
Thomas
I can see that your controller does not contain all the necessary code. Please take note of the line that replaces the RenderHelper.EventCancelBubbleCommand code. I recommend that you copy my controller to your application without changes.
If this still does not not help, please provide a sample project where the issue can be reproduced.
Thank you very much for the hint, about the Controller, it works, also with Firefox, great!!!
Hello,
The application throws exception when I include the attached controller.
Thank you. We did not take this scenario into account. I have updated the controller to support it.