Hi!
>Sarosh,
>
>>1] How can I make a BO ReadOnly?
>
>We can look at adding the option to generate only get() methods, but not set(). I'm curious about the use case for this?
I have a form (Parent-Child one to many) where users need to see historical data for a child in a grid (mmDataGridView) and that grid (or the BO) needs to be readonly so that users cannot make any changes (No Adds, Deletes or Updates).
I thought if I simply set the child (mmDataGridView) grid's ReadOnly property to true I would be done but every time I change a row in the parent the "HookParentRetrieved" fires on the child and then finally
SetEnabled(ImmUISecurity control, int rowCount) calls control.SetAccessFull()
public virtual void SetAccessFull()
{
this.Enabled = true;
this.Visible = true;
this.ReadOnly = false;
}
which makes the child grid's ReadOnly to false so now that grid is editable which is not what I want. Right now my work around is to write code in that grids ReadOnlyChanged event and set it's ReadOnly property back to true.
>
>>2] How can I make my toolstrip buttons like 'New', 'Delete' work on the currently selected (in focus) control (DataGridView) and not just the PrimaryBizObj of the form?
>
>You can dynamically change the PrimaryBizObj on the form as different controls receive focus.
Will that have any other side effects?
e.g. A form with Parent-Child-GrandChild in grids. By default the Parent is the PrimaryBizObj now if I make the Child or GrandChild the PrimaryBizObj
1] What will happen if I add/delete/save/cancel when I am on the Child or GrandChild?
2] Should I also set the Forms "this.NavControl = " to that Child/GrandChild as well?
3] What is the best event to set the PrimaryBizObj? Would each grid's Enter event make sense?
>
>>3] How can I create a Modal Form that inherits from AppBusinessForm and is a child to another Form that also inherits from AppBusinessForm but still remains within the MainForm that inherits from mmMainAppForm?
>
>Which form is it specifically that you want to subclass from?
Here is my UseCase:
An MDI Application (MainForm : mmMainApp) with MDIChild Sheets (CustomerForm : AppBusinessForm)
When the Customer Form (MDIChild Sheet) is open there is a button to view additional details and this form is also an MDIChild Sheet (CustomerDetailsForm : AppBusinessForm) and I open it
mmAppDesktop.FormMgr.Show(CustomerDetailForm, this); // this = CustomerForm
Now the CustomerDetailForm opens up fine and is Modal but I can move it outside the MDI Appliction's window.
I would like the CustomerDetailForm to be Modal and to be the CustomerForm's child form but still be within the MDI Application's Window.
Thanks
Sarosh