SmartToolbar
 

SmartToolbar

4 posts, 1 answered
  1. Roger Blanchard
    Roger Blanchard avatar
    413 posts
    Registered:
    29 Jun 2018
    03 Jan 2019
    Link to this post
    What is the best way to trap when the tools are enabled/disabled?

    I have a form with a custom tool that I added to the toolbar that allows the user to print a label. I only want this tool enabled in certain situations such as record available but has not been changed by user. Is trapping the tools being enabled/disabled the best way or is there a better way?
  2. Mike Fechner
    Mike Fechner avatar
    342 posts
    Registered:
    14 Sep 2016
    Answered
    03 Jan 2019 in reply to Roger Blanchard
    Link to this post
    Hi Roger,

    I typically base this on two properties:

    a) Available of the Data Adapter

    b) The viewer's SmartTableIOState, which can be FieldsEnabled (no change yet) or ModifyingData (change in progress).

    I subscribe to the Viewer's SmartTableIOStateChanged and the Data Adapter's QueryPositionChanged and AfterRetrieveData events. 
  3. Roger Blanchard
    Roger Blanchard avatar
    413 posts
    Registered:
    29 Jun 2018
    03 Jan 2019 in reply to Mike Fechner
    Link to this post
    Okay, thanks...will take a look.
  4. Roger Blanchard
    Roger Blanchard avatar
    413 posts
    Registered:
    29 Jun 2018
    04 Jan 2019 in reply to Mike Fechner
    Link to this post
    Works great, thanks.
4 posts, 1 answered