New Posts New Posts RSS Feed: Why are the properties of a related object set to readonly?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Why are the properties of a related object set to readonly?

 Post Reply Post Reply
Author
Customer View Drop Down
Senior Member
Senior Member
Avatar
User Submitted Questions to Support

Joined: 30-May-2007
Location: United States
Posts: 260
Post Options Post Options   Quote Customer Quote  Post ReplyReply Direct Link To This Post Topic: Why are the properties of a related object set to readonly?
    Posted: 16-Jul-2007 at 11:05am
I have a issue while displaying the address for a contact in a tabview. Adderss, city  and postal code are displayed in a text box. Though we haven't set these properties to read only in the design view, they are greyed out at the run time. We should be able to edit these fields at the run time.
Back to Top
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post Posted: 16-Jul-2007 at 11:08am
This is a great question and one that developers new to DevForce often ask.
 
Your problem is that you are binding to properties of a related object.  It's true that you have done nothing to make these properties readonly, but DevForce makes access to these  properties readonly by default - for the good reason that it is unusual to want to change the value of a related object through an interface looking at the original object. Thus, while looking at an Employee, we could look at her address but we would typically change her address by popping up a dialog for that purpose or, perhaps, reserving real estate on the screen for that purpose. 
 
In addition, if you make a related  property editable, it can be confusing what the edit means.  For example, let us say that an employee's manager's name is "Nancy Davolio" and a user changes it to "Nancy Smith".  Does the employee have a new manager, or has Nancy's last name changed because she married Bob Smith.
 
If you really insist on editing a related poperty, you can set the editability of the control to "Optional".  This works, but before you go ahead and do this, ask yourself whether this is the best way to edit this related property.
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down