Ticket T195583
Visible to All Users

ASPxGridListEditor - Simplify the use of ImmediatePostData in editable List Views

created 10 years ago (modified 9 years ago)

When the ImmediatePostData is set to True, the web grid list editor sends a callback that refreshes the grid, which may lead to issues under certain circumstances. For example: T193901Q493629.
So, this functionality was disabled by default in v14.2.4-15.2.7 (there was also a corresponding note in the product documentation).
If you did not have issues with ImmediatePostData in editable list views in these versions, you could enable the previous behavior using the following controller:

C#
using System; using DevExpress.ExpressApp; using DevExpress.ExpressApp.Web.Editors.ASPx; using DevExpress.ExpressApp.Web.SystemModule; using DevExpress.Web; namespace YourSolutionName.Module.Web.Controllers {     public class T195583 : ViewController<ListView> {         protected override void OnViewControlsCreated() {             base.OnViewControlsCreated();             ASPxGridListEditor gridListEditor = View.Editor as ASPxGridListEditor;             if(gridListEditor != null) {                 foreach(GridViewColumn column in gridListEditor.Grid.Columns) {                     GridViewDataColumn dataColumn = column as GridViewDataColumn;                     if(dataColumn != null) {                         EditModeDataItemTemplate template = dataColumn.EditItemTemplate as EditModeDataItemTemplate;                         if(template != null) {                             ISupportImmediatePostData supportImmediatePostData = template.PropertyEditor as ISupportImmediatePostData;                             if(supportImmediatePostData != null) {                                 if(supportImmediatePostData.ImmediatePostData) {                                     template.PropertyEditor.ControlCreated += PropertyEditor_ControlCreated;                                 }                             }                         }                     }                 }             }         }         void PropertyEditor_ControlCreated(object sender, EventArgs e) {             ISupportImmediatePostData supportImmediatePostData = sender as ISupportImmediatePostData;             supportImmediatePostData.SetImmediatePostDataCompanionScript(WebPropertyEditorImmediatePostDataController.ImmediatePostDataCompanionScript);             supportImmediatePostData.SetImmediatePostDataScript(WebPropertyEditorImmediatePostDataController.GetImmediatePostDataScript());         }     } }

Answers

created 10 years ago (modified 9 years ago)

We have implemented the functionality described in this ticket. It will be included in our next update(s).

Please check back and leave a comment to this response to let us know whether or not this solution addresses your concerns.

Additional information:

Starting with version 15.2.9, the controller above is no longer required, as this code has been moved to the standard delivery. This is done to avoid the necessity of copying and maintaining this code in each of your projects for the majority of XAF customers who did not experience the scenarios or issues above.

However, the use of ImmdediatePostData in an editable ListView in ASP.NET applications still has certain limitations. Please ensure that the application behavior meets your requirements before publishing your application. You can always disable ImmdediatePostData for a specific column using the IModelCommonMemberViewItem.ImmediatePostData property of the Views | <ListView> | Columns | <Column> node in the Model Editor invoked for the ASP.NET project. Feel free to contact us if you experience any difficulties.

    Show previous comments (6)
    Dennis Garavsky (DevExpress) 8 years ago

      @Pedro Martinez:
      I've created a separate ticket on your behalf (T474345: Issues with ImmediatePostData and ASPxGridListEditor). It has been placed in our processing queue and will be answered shortly.

        Hi,
        I've tried this solution. But, EditItemTemplate property returns null value for XAF/Web/ListView/Inline Edit/19.1.3.

        Other than this, if I set this parameters on Global.asax, the problem is resolving and FindPropertyEditor() method is returning the value.

        ASPxGridListEditor.UseASPxGridViewDataSpecificColumns = false;

        Unfortunately, Inline Edit mode, etc. features disappear, if I set.

        How can I do?

        Thanks ,
        Levent

        Dennis Garavsky (DevExpress) 5 years ago

          Hello Levent,

          I've created a separate ticket on your behalf (Web - The FindPropertyEditor method returns null value for ListView in the inline edit mode). It has been placed in our processing queue and will be answered shortly.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.