Alpha Video Training
Results 1 to 11 of 11

Thread: Multi-field search hide grid issue

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

    Default Multi-field search hide grid issue

    Grid has 3 dropdown search fields: DD1, DD2, DD3. DD2 & DD3 are "cascading" meaning that DD3 relies on the results of DD2 and DD2 relies on DD1. The grid is set to be hidden when the search is inactive. All of this works as advertised. But here is my issue:

    ...after the user performs his first query based upon the 3 selections and then decides to change the value of DD1 or DD2, DD@ and/or DD3 clears (as it/they should), but the grid still shows the previous search results. Not good. The minute they change DD1 or DD2, the grid should either hide itself or clear the previous results. I'm sure this is simple to do, but I didn't see a JS action to do this.

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,759

    Default Re: Multi-field search hide grid issue

    {GRID.OBJECT}.clearSearchForm();return false;

    will clear the search form and hide the grid again... but it's not really what you want to do because you're entering stuff into the search form. There is a togglevisibility method that the search part uses but it only seems to work on 'SEARCH_PART'. There's something in clearSearchForm that checks if the Grid should be hidden. Maybe Selwyn can tell you if you can get to that part of the code.

    See if putting {GRID.OBJECT}.clearSearchForm();return false; into the onFocus event of the search field would help at all. Probably not since the search grid would keep getting cleared... you have multiple fields.
    Last edited by Davidk; 12-23-2011 at 09:42 PM.

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

    Default Re: Multi-field search hide grid issue

    Thanks David. Yeah, I saw .clearSearchForm() and I figured that won't help me since I DON"T want to clear the search criteria, just hide the grid. If I clear the search as the dropdown gets changed, I'll never get to the query. I know there's a way. Can I hide the grid part in the master template maybe?
    ---
    And here is an easier question. How can I hide the search button? I don't need it since DD3 is set to auto-query.

  4. #4
    Member
    Real Name
    David Mildenhall
    Join Date
    Jul 2009
    Location
    Reading, UK
    Posts
    235

    Default Re: Multi-field search hide grid issue

    This link refers to hiding the search button

    http://msgboard.alphasoftware.com/al...+search+button

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

    Default Re: Multi-field search hide grid issue

    Quote Originally Posted by DBM View Post
    This link refers to hiding the search button

    http://msgboard.alphasoftware.com/al...+search+button
    Thanks, I'll check it out.

  6. #6
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,759

    Default Re: Multi-field search hide grid issue

    You could use the visibility style to show and hide the grid, but I don't know if you want to go that far.

    In the search field's onChange event, show the grid

    Code:
    $('{Grid.ComponentName}.GRID_PART.FORM_CONTAINER_DIV').style.visibility = 'visible';
    In the search field's onFocus event, hide the grid

    Code:
    $('{Grid.ComponentName}.GRID_PART.FORM_CONTAINER_DIV').style.visibility = 'hidden';
    That Search button is a little bugger because it's not named... only the title is named. You could use the Search Grid properties and change it to an Icon, then you can apply your own icon which could be something invisible. Or add a style that will replace the button style. Getting rid of the "Search" title is easy, but the button is still there.

  7. #7
    "Certified" Alphaholic
    Real Name
    Frank Bicknell
    Join Date
    Feb 2010
    Location
    39.1915° N, 84.4348° W
    Posts
    2,467

    Default Re: Multi-field search hide grid issue

    Would setting the Toolbar position to 'none' in the Search options work for you?
    Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

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

    Default Re: Multi-field search hide grid issue

    Quote Originally Posted by frankbicknell View Post
    Would setting the Toolbar position to 'none' in the Search options work for you?
    That's very good, Frank, but I get an error "style is null or not an object"?

  9. #9
    "Certified" Alphaholic
    Real Name
    Frank Bicknell
    Join Date
    Feb 2010
    Location
    39.1915° N, 84.4348° W
    Posts
    2,467

    Default Re: Multi-field search hide grid issue

    Not sure about the error. I do that in several of my grids and have not seen that error.
    Here are the settings from one of the grids:
    Attachment 30332
    Last edited by frankbicknell; 12-27-2011 at 08:28 AM.
    Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

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

    Default Re: Multi-field search hide grid issue

    Thanks. It was me. I was applying this in the onObjectInitialize event: ('GRID1.SEARCHBTN').style.visibility = 'hidden'; which didn't work 100% due to a mystery border or something that remains. Your solution is perfect and obvious - so obvious that I didn't see it. Thanks!

  11. #11
    Member
    Real Name
    Renny Jacob
    Join Date
    Mar 2012
    Location
    Dubai
    Posts
    117

    Default Re: Multi-field search hide grid issue

    could u please share this form/ grid, as I'm looking for a similiar solution?
    thanx
    Renny

Similar Threads

  1. Hide Grid when no active search
    By bhaub in forum Application Server Version 10 - Web/Browser Applications
    Replies: 4
    Last Post: 02-25-2010, 10:33 PM
  2. Hide Search Part in a Grid
    By Vasan in forum Application Server Version 9 - Web/Browser Applications
    Replies: 4
    Last Post: 10-12-2009, 04:01 AM
  3. Grid Quick Search & Search Part Issue
    By den1s in forum Application Server Version 9 - Web/Browser Applications
    Replies: 0
    Last Post: 06-29-2009, 11:47 AM
  4. Multi-Field Search
    By Inge Hansen in forum Alpha Five Version 5
    Replies: 2
    Last Post: 08-20-2004, 11:12 AM
  5. Search hide / Grid Hide
    By David Henderson in forum Alpha Five Version 6
    Replies: 5
    Last Post: 08-07-2004, 10:24 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
  •