Current filter:
                                You should refresh the page.
                                  • Is there a way to use a text box on the toolbar as input to a ObjectsGetting method?

                                    My ObjectViewController is

                                    public partial class OrderObjectSpaceController : ObjectViewController<ListView, OrderResult> { public OrderObjectSpaceController() { InitializeComponent(); TargetObjectType = typeof(OrderResult); } protected override void OnActivated() { base.OnActivated(); var os = (NonPersistentObjectSpace)ObjectSpace; os.ObjectsGetting += os_ObjectsGetting; View.CollectionSource.CriteriaApplied += CollectionSource_CriteriaApplied; AddPersistentJobTalkOsToNonPersistentOs(Application, os); ObjectSpace.Refresh(); } protected override void OnDeactivated() { var os = (NonPersistentObjectSpace)ObjectSpace; os.ObjectsGetting -= os_ObjectsGetting; View.CollectionSource.CriteriaApplied -= CollectionSource_CriteriaApplied; base.OnDeactivated(); DataGetters.DisposeAdditionalPersistentObjectSpace(Application, os); } private void view_CustomizeViewShortcut(object sender, CustomizeViewShortcutArgs e) { var tag = ((View)sender).Tag; if (tag != null) e.ViewShortcut.Add("Tag", tag as string); } private void view_Closed(object sender, EventArgs e) { var view = (View)sender; view.Closed -= view_Closed; view.CustomizeViewShortcut -= view_CustomizeViewShortcut; } private void os_ObjectsGetting(object sender, ObjectsGettingEventArgs e) { if (View.Tag == null) return; // I want to use the Text from the toolbar here e.Objects = OrderResult.GetData(View.Tag.ToString()); } private void CollectionSource_CriteriaApplied(object sender, EventArgs e) { ObjectSpace.Refresh(); } private static void AddPersistentJobTalkOsToNonPersistentOs(XafApplication application, NonPersistentObjectSpace os) { var additionalObjectSpace = application.CreateObjectSpace(typeof(TaskExt)); if (os.AdditionalObjectSpaces.Count == 0) { os.AdditionalObjectSpaces.Add(additionalObjectSpace); } } }

                                1 Solution

                                Creation Date Importance Sort by

                                Hello Kirsten.

                                The ObjectsGetting event is raised only when the collection is initially created. To support filtering of an existing collection, NonPersistentObjectSpace needs to be improved. We will consider this functionality for the future.

                                Currently, you can create a custom descendant of the NonPersistentObjectSpace class and override the ApplyCriteria method. You will likely also need a custom collection class that supports filtering without losing the original contents for this task.