New Posts New Posts RSS Feed: EditorController
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

EditorController

 Post Reply Post Reply
Author
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Topic: EditorController
    Posted: 18-Sep-2007 at 2:38pm
In the Orders Master tab you can add/delete/modify the current item by clicking the buttons in the NavBar.
 
I can not see how this is implemented. Can you explain. Do I have to create a seperate module for the controls I wish to use this.
 
I see in Module.cs file that it's Service Dependency is not WorkItem but IEntityEditorService.
Back to Top
Bill Jensen View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Jul-2007
Location: United States
Posts: 229
Post Options Post Options   Quote Bill Jensen Quote  Post ReplyReply Direct Link To This Post Posted: 18-Sep-2007 at 4:41pm
In the Orders Master tab you can add/delete/modify the current item by clicking the buttons in the NavBar.  I can not see how this is implemented. Can you explain. Do I have to create a seperate module for the controls I wish to use this.
 
This is buried pretty deep. 
 
Since the customer orders display is part of a tab view, it is controlled by a TabViewController, the "CustomerOrdersTabViewController".  This ultimately inherits from MasterDetailTabViewController which inherits from MasterDetailTabViewControllerBase.  Here we find the method "ConfigureMasterViewContext":
 
(Sorry about the double spacing)

/// <summary>Configure the Master Grid's ViewContext per the standard defaults.</summary>

/// <remarks>

/// This implementation configures the master grid to show

/// its toolstrip, be readonly, and support add, delete, and edit of rows.

/// Row double-click launches an editor for the current row.

/// </remarks>

protected virtual void ConfigureMasterViewContext() {

mMasterViewContext.GridViewToolStripVisible = true;

mMasterViewContext.ReadOnly = true;

RegisterMasterCommandHandler(CommandNames.AddNew, AddNewCommandHandler<TMaster>);

RegisterMasterCommandHandler(CommandNames.Delete, DeleteCommandHandler<TMaster>);

RegisterMasterCommandHandler(CommandNames.Edit, EditCommandHandler<TMaster>);

mMasterViewContext.RowDoubleClickCommandName =

mMasterViewContext.MakeViewSpecificId(CommandNames.Edit);

}

Since this method is protected virtual, you could override it in your TabViewController to obtain different behavior.
 
 
 
I see in Module.cs file that it's Service Dependency is not WorkItem but IEntityEditorService.
 
I see this in SharedEditorModule.cs.  It simply means that the SharedEditor module needs access to the EditorService in order to register itself for access by other modules.  It doesn't need access to any workitem.
 
Does this help?
 
Bill J.
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 19-Sep-2007 at 9:09am

How do I do it if I do not want to use the MasterDetailTab.

Back to Top
Bill Jensen View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Jul-2007
Location: United States
Posts: 229
Post Options Post Options   Quote Bill Jensen Quote  Post ReplyReply Direct Link To This Post Posted: 19-Sep-2007 at 12:08pm

You'll need to walk through the code of MasterDetailTabViewController base, understand what it's doing, and do the same thing in your page or tab view controller.

Bill J.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down