UseByListViewCriteriaObjectCreating

StatusIDPriorityType
Closed36446TrivialQuestion
ProfileReply
RossClient

Hi

I would like to remove the UseByListViewCriteriaObjectCreating functionality from my project. Is there a global way to remove this?

Kind Regards
Nico Theunissen

Replies

UserDescriptionPosted On
MariyaVoytovichAgent

Hello Nico!

To remove the UseByListViewCriteriaObjectCreating functionality from my project, you need deactivate ListViewCriteriaObjectCreatingController.

Feel free to contact us if you have any questions.

Regards,
Mariya
On behalf of Xafari Client Services Team

Ross

Hi Mariya

Please can you let me know how to deactivate the controller please. I tried to deactivate it but there isn't any option to do so.

Kind Regards
Nico

MariyaVoytovichAgent

Hello Nico!

Sorry for the delay with the answer.

To disable ListViewCriteriaObjectCreatingController, inherit From a Controller ListViewCriteriaObjectCreatingControllerWin. In constructor set active property to false.
Also you need to override the method OnFrameAssigned.

public partial class CustomListViewCriteriaObjectCreatingControllerWin : ListViewCriteriaObjectCreatingControllerWin
{
public CustomListViewCriteriaObjectCreatingControllerWin()
{
this.Active["CustomController"] = false;
InitializeComponent();
}protected override void OnFrameAssigned()
{

}
}

Feel free to contact us if you need further assistance or have additional questions.

Regards,
Mariya
On behalf of Xafari Client Services Team

Ross

Hi Mariya!

I still can't get it to work.

I created a ViewController in the Project.Module called "CustomListViewCriteriaObjectCreatingControllerWin" as shown in code below.
But when I go into the model editor the controller is still there.

Partial Public Class CustomListViewCriteriaObjectCreatingControllerWin
Inherits ListViewCriteriaObjectCreatingControllerWin
Public Sub New()
Me.Active("CustomController") = False
InitializeComponent()
End Sub
Protected Overrides Sub OnFrameAssigned()
MyBase.OnFrameAssigned()
End Sub

Protected Overrides Sub OnActivated()
MyBase.OnActivated()

End Sub
Protected Overrides Sub OnViewControlsCreated()
MyBase.OnViewControlsCreated()

End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
End Sub
End Class

Im new to the XAF Framework. I do apologize for the inconvenience.

Kind Regards
Nico

MariyaVoytovichAgent

I want to draw your attention to the fact that in the override method OnFrameAssigned, you do not need to call the base.

Regards,
Mariya
On behalf of Xafari Client Services Team

Ross

Yeah I tried with calling base and without and it still didn't work.

Regards
Nico

MariyaVoytovichAgent

Сan You provide a demo project?

Regards,
Mariya
On behalf of Xafari Client Services Team

Ross

Hi Mariya

Its all sorted out thanks.

× This ticket is closed.

Write US