SmartTableIOTarget
 

SmartTableIOTarget

4 posts, 1 answered
  1. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    11 Dec 2018
    Link to this post
    I am in the process of migrating our WebClient application that was designed for a windows tablet to the SCL. When running on a 8 or 10 inch tablet form real estate is always an issue. What we have done is use the tab control and have multiple tabs for the forms that require this with each tab having a user control. For some of these forms we are updating the same record on multiple tabs. For example, in our Item/Price Maintenance form tab 1 will have a user control that will update fields from the Item table. Tab 2 will have a user control that will update other fields from the Item table. 

    What I have done is create two user controls that inherit the SmartViewerControl. These user controls were dropped on tab 1 and tab 2. I assigned the LinkDataSource to my ItemAdapter for each as well as the LinkTableIOSource to my ItemToolbar for each. When I do this and click UPDATE only the user control on tab 1 is enabled. If I add code to the ActiveTabChanged similar to what is below where I am toggling the SmartTableIOtarget I still not get the desired results.

    THIS-OBJECT:ItemToolbar:ActivateSmartTableIOTarget(THIS-OBJECT:itemMaintViewer).

    Is there a way to do what I am trying to do? Basically, have two SmartViewControls set to the same Toolbar as the TableIOTarget? I know I could add another TAB inside the SmartViewer but then I would have a tab within a tab.
  2. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    Answered
    11 Dec 2018 in reply to Roger Blanchard
    Link to this post
    It's not clear to me what's going on there.

    But in situations like this, I'd use the GroupAssign link anyway. The second SmartViewerControl component should not use the LinkTableIOSource pointing to the toolbar component. It should set the LinkGroupAssignSource pointing to the first viewer. That way when the first viewer is in update, the second viewer will be as well. One save function, one cancel, one create, one delete.
  3. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    12 Dec 2018 in reply to Mike Fechner
    Link to this post
    Thanks 
  4. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    12 Dec 2018 in reply to Mike Fechner
    Link to this post
    The group assign will do what I need,

    thanks,
4 posts, 1 answered