http://dennisgaravsky.blogspot.hk/2016/05/winforms-gridlisteditor-how-to-restore.html
using System; using DevExpress.XtraGrid; using DevExpress.ExpressApp; using DevExpress.XtraGrid.Views.Grid; using DevExpress.ExpressApp.Win.Editors; namespace MainDemo.Module.Win { public class B152594 : ViewController<ListView> { GridListEditor gridlistEditor = null; protected override void OnViewControlsCreated() { base.OnViewControlsCreated(); gridlistEditor = View.Editor as GridListEditor; if(gridlistEditor != null) { gridlistEditor.Grid.HandleCreated += Grid_HandleCreated; } } private void Grid_HandleCreated(object sender, EventArgs args) { GridControl grid = (GridControl)sender; grid.HandleCreated -= Grid_HandleCreated; using(var criteriaScope = View.ObjectSpace.CreateParseCriteriaScope()) {//!!! ((GridView)grid.MainView).GuessAutoFilterRowValuesFromFilter(); } } } }
欢迎转载,转载请注明出处:http://www.cnblogs.com/Tonyyang/