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.