/// <summary> /// 设置显示控制器 /// </summary> /// <param name="grid"></param> /// <param name="dm"></param> /// <param name="gridName"></param> public static void SetDisplayManager(this IBoundGrid grid, IDisplayManager dm, string gridName) { if (dm == null) { throw new ArgumentNullException("dm"); } grid.DisplayManager = dm; grid.GridName = gridName; grid.SetState(StateType.View); grid.DisplayManager.BindingControls.Add(grid); grid.CreateGrid(); ManagerFactory.CreateSearchManagerEagerFetchs(dm.SearchManager, gridName); grid.AfterLoadData(); }