TopReturnedObjects immediately work

Closed28823CriticalQuestionDockVisibility TopReturnedObjects

I have two objects:category and product.see picture 001.png.
In product lookup listview, I can filter products by category.
and I have three buttons:top3,allItems,ShowHideCategory. seepicture 002.png.
I want top3 button can set the TopReturnedObjects=3,
allItems button can set the TopReturnedObjects=0,
ShowHideCategory can control the master dockpanel category Show or Hide.

the question is:
I set the TopReturnedObjects=3, but it can not immediately effect the data, only next time it shows top 3 objects.
I want after I set the TopReturnedObjects=3, the view immediatedly refresh data.
see picture 003.png. 004.png.

for ShowHide dockpanel:
I set the dockPanel visisbility=visible and hope the dockpanel show immediately.If set visibility=Hide,the dockpanel hide immediately.
pls help me how to set?
see picture 005.png

my solution is solution8.rar.

Attached files:


UserDescriptionPosted On
Sasha (Xafari Support)Agent

Hello nickcole,

You can solve your issues, if you change a methods for your actions:

Show Hide Category

private void ShowHideCategory_Execute(object sender, SimpleActionExecuteEventArgs e)
var xafariDockingWinWindowController = Frame.GetController();//Set DockVisibility
if(xafariDockingWinWindowController == null) return;
var manager = xafariDockingWinWindowController.DockManager;
foreach (DockPanel dockpanel in manager.Panels)
if (dockpanel.Visibility != DockVisibility.Visible)
dockpanel.Visibility = DockVisibility.Visible;
dockpanel.Visibility = DockVisibility.Hidden;

Top 3

private void Top3_Execute(object sender, SimpleActionExecuteEventArgs e)
if(View.Id== "Product_LookupListView")
//IModelListView model = View.Model as IModelListView;
//if(model == null) return;
//model.TopReturnedObjects = 3;var view = this.View as ListView;
if(view == null) return;
//view.CollectionSource.TopReturnedObjects = model.TopReturnedObjects;
view.CollectionSource.TopReturnedObjects = 3;

All Items

private void AllItems_Execute(object sender, SimpleActionExecuteEventArgs e)
if (View.Id == "Product_LookupListView")
//IModelListView model = View.Model as IModelListView;
//if(model == null) return;
//model.TopReturnedObjects = 0;var view = this.View as ListView;
if (view == null) return;
//view.CollectionSource.TopReturnedObjects = model.TopReturnedObjects;
view.CollectionSource.TopReturnedObjects = 0;

We hope you will continue to use our product.
Let us know if you need further assistance.
Thanks, Sasha.

Attached files:

× This ticket is closed.