How to set initial value for extra filter?

StatusIDPriorityType
Closed28547CriticalQuestion
ProfileReply
nickcoleClient

I have set extra filter for my object.
It work ok.
But the default value for filter is 'no set', so all objects will load .
I want set initial value for extra filter, such as from '2017-01-01' to '2017-03-31, so only a part objects would load in first time.
I set the initial value in the view controller, but it does not work.please see 01.png. o2.png.
some code as fllow. But it does not work.
please tell me how to set initial value for extra filter?
solution5.rar is my solution.
protected override void OnActivated()
{
base.OnActivated();
// Perform various tasks depending on the target View.

var controller = this.Frame.GetController();
if (controller == null) return;
var action = (Xafari.Actions.PopupContainerShowAction)controller.Actions["PeriodFilterAction"];
if (action == null) return;

action.Value = new PeriodStruct
{
Start = DateTime.Parse("2017-01-01"),
End = DateTime.Parse("2017-12-31")
};

Replies

UserDescriptionPosted On
Sasha (Xafari Support)Client

Hello nickcole,

Thanks for the clarification.
You can try to move your ViewController to the folder: Solution5.Module.Win.Controllers. This operation can help you solve your issue.

Let us know if this operation doesn't help.
Best regards,
Sasha.

Sasha (Xafari Support)Client

*The PeriodFilterAction controls implemented for Web and Win different way, so you must realise an operations for to PeriodFilterAction (Web and Win) in Module.Win and Module.Web.

nickcole

Thanks.
It works fine!

× This ticket is closed.

Write US