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: T193901, Q493629.
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());
}
}
}