Alpha DevCon 2018
Results 1 to 8 of 8

Thread: {grid.object}.methodName(); AND '{grid.object}' i

  1. #1
    Member NicholasWieland's Avatar
    Real Name
    Nicholas Wieland
    Join Date
    Apr 2008
    Location
    Huntington, NY
    Posts
    545

    Default {grid.object}.methodName(); AND '{grid.object}' i

    Okay so there is a way of doing this has anyone done this before?

    I watched v10 video 62. Getting a pointer to a Grid's parent Grid Object.

    I want to put a button on a grid that will ONLY show if the data in another table is there. So the button named Filters will show from grid_Customers when there is data for the record it is on in the table named filters. I have a grid named grid_filters which can show there records but has anyone done this type of show hide setup?

    So do I have to do a hide show function like video 62?

    e.g. like
    function hideShowfilter_grid(){
    records = [grid.object]._filteredRecordsingrid;
    ele - ('{grid.ComponentName}.hideShowfilter');
    minrecords = 1;
    if(ele) {
    if(records < minRecords) ele.style.display - 'none';
    else ele.styple.display = "" ;
    }
    }

    Am I going down the right trail here?
    Nicholas Wieland
    LedgerSuite.com Corp
    nnw@edfi.net
    http://www.ledgersuite.com


  2. #2
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,577

    Default Re: {grid.object}.methodName(); AND '{grid.object}' i

    Quote Originally Posted by NicholasWieland View Post
    I want to put a button on a grid that will ONLY show if the data in another table is there. So the button named Filters will show from grid_Customers when there is data for the record it is on in the table named filters. I have a grid named grid_filters which can show there records but has anyone done this type of show hide setup?
    ....
    Am I going down the right trail here?
    Nicholas,

    Not sure if I understand you. If you mean a button in a grid for each record - yes I do that. No JavaScript. The trick I use is to create a view w. the child table which includes the child table's linking field. I hide that child column in the grid. I use a simple expression to show/hide the button if a child record exists. But, then again, maybe I misunderstood your intent?

    See attached images...

  3. #3
    Member NicholasWieland's Avatar
    Real Name
    Nicholas Wieland
    Join Date
    Apr 2008
    Location
    Huntington, NY
    Posts
    545

    Default Re: {grid.object}.methodName(); AND '{grid.object}' i

    Peter,

    Yes that is what I am after I missed that event I hope it works against a different table though.
    Nicholas Wieland
    LedgerSuite.com Corp
    nnw@edfi.net
    http://www.ledgersuite.com


  4. #4
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,577

    Default Re: {grid.object}.methodName(); AND '{grid.object}' i

    Quote Originally Posted by NicholasWieland View Post
    ...I hope it works against a different table though.
    You have to use a view.

  5. #5
    Member NicholasWieland's Avatar
    Real Name
    Nicholas Wieland
    Join Date
    Apr 2008
    Location
    Huntington, NY
    Posts
    545

    Default Re: {grid.object}.methodName(); AND '{grid.object}' i

    peter,

    The client side properties do not have a lookup to another table in the Insert Function so I can still use a lookup?

    If I use it, it is giving me a javascript error.
    Nicholas Wieland
    LedgerSuite.com Corp
    nnw@edfi.net
    http://www.ledgersuite.com


  6. #6
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,577

    Default Re: {grid.object}.methodName(); AND '{grid.object}' i

    Are you using dbf or sql?

  7. #7
    Member NicholasWieland's Avatar
    Real Name
    Nicholas Wieland
    Join Date
    Apr 2008
    Location
    Huntington, NY
    Posts
    545

    Default Re: {grid.object}.methodName(); AND '{grid.object}' i

    Actually it is a passive link table into QB Enterprise invoiceline.table.

    I just tried to do this against a current dbf table and get javascript errors.
    Nicholas Wieland
    LedgerSuite.com Corp
    nnw@edfi.net
    http://www.ledgersuite.com


  8. #8
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,577

    Default Re: {grid.object}.methodName(); AND '{grid.object}' i

    I guess it doesn't matter. If you added the child field to "Fields in view" and hit the refresh button, it should be available in the "lookup" on the ClientSide Properties.

Similar Threads

  1. Can not create a Grid - hc.object.Refresh method not found
    By Steve T in forum Application Server Version 10 - Web/Browser Applications
    Replies: 8
    Last Post: 01-13-2010, 09:38 AM
  2. {grid.Object}._setValue not working?
    By GarthMc in forum Application Server Version 10 - Web/Browser Applications
    Replies: 1
    Last Post: 01-12-2010, 04:56 PM
  3. "Object Required" Error in Grid Detail - troubleshooting
    By fsi in forum Application Server Version 9 - Web/Browser Applications
    Replies: 6
    Last Post: 08-26-2009, 03:50 PM
  4. Updating the main grid with info from the child grid in a tabed grid linker
    By Mwhite in forum Application Server Version 9 - Web/Browser Applications
    Replies: 5
    Last Post: 06-30-2009, 05:40 PM
  5. Does object.enable now activate the object
    By David Montgomery in forum Alpha Five Version 8
    Replies: 2
    Last Post: 07-27-2007, 04:32 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
  •