Jeff
Jeff

Reputation: 2071

Devexpress XAF (Blazor) Popup window to edit property

I have an XAF application. Most of my Business Objects are based on a baseclass "MyBaseClass" which contains Createdby, ModifiedBy, ... Comments. The Comments field is AllowEdit=false. I only want users to be able to modify the comment thru an action which would allow them to create an entry to which I would prepend their UserName and timestamp.

I don't know how to pop up a window to edit a property (string) within the current object and view. There are plenty of examples of how to CreateListView but in this case what I wish to edit in the popup is not a separate BO but just a string. Maybe that is my problem(???)

I have the Action Controller and I am not sure how to create the DetailView when I get into the _Execute()

Upvotes: 0

Views: 794

Answers (1)

Kirsten
Kirsten

Reputation: 18160

In Winforms XAF I add an action in a view controller. In the action's execute event I call something like

private void actOpenDetailView_Execute(object sender, SimpleActionExecuteEventArgs e)  
{

        var application = Controller.Application
        var viewId = application.FindDetailViewId(typeof(MyBusinessObject));
        application.CreateObjectSpace(typeof(MyBusinessObject));
        var detailView = application.CreateDetailView(newObjectSpace, jh, true);
        e.ShowViewParameters.CreatedView = detailView;
        e.ShowViewParameters.TargetWindow = TargetWindow.NewWindow;

}

I haven't tried that in Blazor.

Upvotes: 0

Related Questions