TopReturnedObjects lead to error

Profile Reply
nickcole Client

In Top n mode, after I add some objects from a action, the application crack when I click the grid.
how to slove it?

attached is my applaction.


User Description Posted On
Sasha (Xafari Support) Client

Hello nickcole,

My apologies for the delay and thanks for the additional information!

You can solve this problem if you use the this.ObjectSpace property instead of the new oSpace.
Alternatively, you can add the line ObjectSpace.CommitChanges (); after oSpace.CommitChanges ();.

Feel free to contact us if you experience any further difficulties.
Best regards,


I add the line ObjectSpace.CommitChanges (); after oSpace.CommitChanges ();.
But it does not work. the problem also exisits !

Sasha (Xafari Support) Client


I'am sorry, I did not notice all the nuances in your sample and and made false conclusions!
I see the problem and I am now working on it.

Thanks, Sasha.

Sasha (Xafari Support) Client


We can offer for your app solution following code:

private void simpleAction1_Execute(object sender, SimpleActionExecuteEventArgs e)
var listView = View as ListView;
if (listView == null) return;var oSpace = this.Application.CreateObjectSpace();for (int i = 0; i < 100; i++)
var domainObject1 = oSpace.CreateObject();
domainObject1.PersistentProperty = string.Format("{0}-{1}", DateTime.Now, i);


Please, inform us if this solution does not suit you.

Best regards,

× This ticket is closed.

Write US