New call-to-action
Results 1 to 4 of 4

Thread: Show/Hide Embedded Grid Action Button From Parent Dialog

  1. #1
    Member
    Real Name
    Ian Mackie
    Join Date
    Oct 2012
    Posts
    10

    Default Show/Hide Embedded Grid Action Button From Parent Dialog

    Perhaps I've been burning the midnight oil far to much of late or I'm simply losing it. It feels like it should be quite simple. I have a "Power Search" with an embedded grid that the filters are applied to. I need to Show or hide an action button in the embedded grid based on a single value in a check box on the parent dialog.

    Details : Checkbox(ENTRY_TYPE) choices = Green,Green-Transfer, Kiln-Dried, KD-Transfer, Log.
    Dependencies: Action button using CurrentGridFilter() for opening grid to update record's pricing in a workspace (div).

    Picture below is a few days work behind but it gets the point across.
    The button on the bottom of the right grid (PriceByGrid) is what i want show only if "Green" is selected in the dialog filter. I'm working on making it so that only one Check box can be checked at a time, if the user checks another box the previous is unchecked...i think i just missed something stupid somewhere and I'm probably a couple hours from sleep deprived hallucinations. Im not sure but this may fix my problem but I'm not sure yet as it seems like the show expression is working on the currently selected row. But I have a board meeting Tuesday to present to program to them and this is one of 3 issues i have left. Looking for some insight on how to handle this with the real estate i have. Big problem is a lot of our clerical staff is either elderly or their vision is not so well so the resolutions are never above 1600x900

    As is show/hide expression is ENTRY_TYPE = "Green" and it works kinda but if there is no filter applied and the user selects a row with green and hits the button it throws an sql error because the grid its loading is only for that entry type. Just want to protect the users from themselves...always




    Pricing Green.JPG

  2. #2
    Member
    Real Name
    Ian Mackie
    Join Date
    Oct 2012
    Posts
    10

    Default Re: Show/Hide Embedded Grid Action Button From Parent Dialog

    Really tired, perhaps should just stop and get some sleep. Changed Checkbox to Radio....{head.Object}.setValueFrom(FACE,PALM) now just to figure out a bogus filter to keep one of the action buttons from being enabled without a filter..or get the grid to not show records until a filter is applied...
    Last edited by Jester0311; 06-08-2013 at 11:30 PM. Reason: typos

  3. #3
    Member
    Real Name
    Ian Mackie
    Join Date
    Oct 2012
    Posts
    10

    Default Re: Show/Hide Embedded Grid Action Button From Parent Dialog

    Have to love it when you figure your own problem's out. Take away the default value for the radio button and in the onInitializeComplete event {dialog.Object}.setValue('ENTRY_TYPE_CHKBOX','Green'). Atleast this way only a relevant button is shown always. works for me. Sorry if i wasted anyone's time trying to help me out. Im all for any better solution thought

  4. #4
    Member
    Real Name
    Ian Mackie
    Join Date
    Oct 2012
    Posts
    10

    Default Re: Show/Hide Embedded Grid Action Button From Parent Dialog

    Since I'm losing it and posting to myself already ill update the final solution. After the onInitializeComplete trial of which i thought was working in fact was only working on the cached grid component. So to fix this instead of doing a timer to allow the grid to be completely rendered before trying to apply a filter to it, in the grid's onGridRenderComplete even i put the following:

    var parent = {grid.Object}.getParentObject();
    parent.setValue('ENTRY_TYPE_CHKBOX','Green')

    Hope this helps someone else out sleep deprived or not.

    Side note hate it when you call it a night and go lay down and have an epiphany and have to get back up to finish it

Similar Threads

  1. Show/Hide Client side action button fails on Macintosh and iOS only
    By gregincolumbus in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 01-26-2013, 11:23 AM
  2. Action Button Hide/Show if Filtered
    By askoog66 in forum Application Server Version 11 - Web/Browser Applications
    Replies: 6
    Last Post: 01-17-2013, 11:07 AM
  3. Hide action button unless ALL records in a grid have a value in one field
    By gregincolumbus in forum Application Server Version 11 - Web/Browser Applications
    Replies: 0
    Last Post: 12-28-2012, 09:17 AM
  4. Show button in Parent Grid based on value in field on Child Grid
    By Cammy in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 11-03-2011, 12:17 PM
  5. Show/Hide Expression for Action Button
    By Atta in forum Application Server Version 10 - Web/Browser Applications
    Replies: 4
    Last Post: 10-20-2011, 12:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •