public ActionResult Export() { TreeListExportDemoOptions options = new TreeListExportDemoOptions() { EnableAutoWidth = false, ExpandAllNodes = false, ShowTreeButtons = false }; Session["TreeListExportOptions"] = options; return(DemoView("Export", DepartmentsProvider.GetDepartments())); }
public ActionResult Export([Bind] TreeListExportDemoOptions options) { Session["TreeListExportOptions"] = options; foreach (string typeName in TreeListDemoHelper.ExportTypes.Keys) { if (Request.Params[typeName] != null) { return(TreeListDemoHelper.ExportTypes[typeName].Method( TreeListDemoHelper.CreateExportTreeListSettings(options), DepartmentsProvider.GetDepartments() )); } } return(DemoView("Export", DepartmentsProvider.GetDepartments())); }
public static DevExpress.Web.Mvc.TreeListSettings CreateExportTreeListSettings(TreeListExportDemoOptions options) { if (exportTreeListSettings == null) { exportTreeListSettings = CreateTreeListSettings(); } exportTreeListSettings.SettingsExport.PrintSettings.AutoWidth = options.EnableAutoWidth; exportTreeListSettings.SettingsExport.PrintSettings.ExpandAllNodes = options.ExpandAllNodes; exportTreeListSettings.SettingsExport.PrintSettings.ShowTreeButtons = options.ShowTreeButtons; return(exportTreeListSettings); }