FocusControlOnAdd / FocusControlOnUpdate
 
Forums / SmartComponent Library - Developer Forum / FocusControlOnAdd / FocusControlOnUpdate

FocusControlOnAdd / FocusControlOnUpdate

7 posts, 1 answered
  1. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    09 Jan 2019
    Link to this post
    As the name suggests should these properties control what field is given focus when adding / updating a record? These properties do not seem to work. I do have my fields on a Microsoft TableLayourPanel...is it possible this may cause it not to work?
  2. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    09 Jan 2019 in reply to Roger Blanchard
    Link to this post
    That sounds not right. Can you please create a ticket with a simple reproducible? 
  3. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    09 Jan 2019 in reply to Mike Fechner
    Link to this post
    Mike,

    Maybe I am confused. If I click on my Viewer there exists these properties but it only shows controls on the current form. I assume this is the control you want focus when creating updating so it allows the proper viewer to be shown. that does appear to work.

    Inside the Viewer I also have these same properties that will show all controls in the current viewer. I assume I set these to the actual editor control I want to have focus upon clicking add or update.

    Is that correct?
  4. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    09 Jan 2019 in reply to Roger Blanchard
    Link to this post
    The Visual Designer of the Form does not have access to the instances within the Viewer. 

    You can set those Properties within the Viewer.
  5. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    09 Jan 2019 in reply to Mike Fechner
    Link to this post
    Correct, and that is what I did.

    I will create a repro...

    thanks.
  6. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    09 Jan 2019 in reply to Roger Blanchard
    Link to this post
    Mike,

    Again, I must be confused. I have those properties set within the viewer. I added logic to Enablefields within the viewer to see the value. The value was correct in the CONTSTRUCTOR but in EnableFields is was set to the Viewer instance. I then added logic in OnFocusControlOnAddChanged to see what was going on. 

    So, it was my confusion by setting this property to the Viewer within the form and then within the viewer to the actual control.

    Sorry for the confusion. I think I understand now...just took three cups of coffee!!

    thanks
  7. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    Answered
    09 Jan 2019 in reply to Roger Blanchard
    Link to this post
    :-)
7 posts, 1 answered