Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Hide child grid' search part.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hide child grid' search part.

    This grid is used in 2 locations: by itself w. the search part and as a child of a row expander. I want to completely hide the search part so that it is inaccessible - as in gone, when opened by the row expander.

    eh?
    Peter
    AlphaBase Solutions, LLC

    Peter@AlphaBaseSolutions.com
    https://www.alphabasesolutions.com



  • #2
    Re: Hide child grid' search part.

    Would it be easier to just have 2 grids?
    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/

    Comment


    • #3
      Re: Hide child grid' search part.

      Originally posted by frankbicknell View Post
      Would it be easier to just have 2 grids?
      No doubt. That's the default position. Just thought I might be able to cut back on the grid clutter. I have a feeling that this is easy to do, but I don't have time to investigate at the moment.
      Peter
      AlphaBase Solutions, LLC

      Peter@AlphaBaseSolutions.com
      https://www.alphabasesolutions.com


      Comment


      • #4
        Re: Hide child grid' search part.

        Using the naming conventions you devised I have very little grid 'clutter'.
        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/

        Comment


        • #5
          Re: Hide child grid' search part.

          I agree with you, Peter. I have made duplicates of my grids many times now so that one has a search part and one does not. When a grid is called by another grid based on a filter, I don't want users to start trying to search for something they think should be there when it won't because of the filter that opened it. Would be wonderful if when we use the inline javascript to open a grid component, we could have an option to hide the search part. I'm getting a lot of the grid clutter that way, too.
          Carol King
          Developer of Custom Homebuilders' Solutions (CHS)
          http://www.CHSBuilderSoftware.com

          Comment


          • #6
            Re: Hide child grid' search part.

            This is not the whole answer because it does not deal with the search title but maybe someone more experienced can enhance / deal with other scenarios

            I have put the following code in the OnGridIntialiseComplete of a grid that has a search part

            Code:
            var me = {Grid.object}.gridId;
            var myparent = {Grid.object}.parentGridAlias;
            
            if (myparent =='') {
            	//alert('no parent');
            	$(me+'.SEARCH_PART.FORM').style.display='';
            }
            else {
            	//alert('has parent')
            	$(me+'.SEARCH_PART.FORM').style.display='none';
            	
            }

            If the grid is used in a standard way then the search part will appear but if the grid is a child of another grid e.g. in a row expander then it should not show (but have not dealt with search title part)

            I got the idea for this approach from the M41 videos.

            Hope it helps.

            Note: Alert parts can be discarded.

            Comment


            • #7
              Re: Hide child grid' search part.

              Update to deal with Search Title

              Put this code instead of the code mentioned in the previous post

              Code:
              var me = {Grid.object}.gridId;
              var myparent = {Grid.object}.parentGridAlias;
              
              if (myparent =='') {
              	// no parent
              	$('SearchTitle').innerHTML="Search ";
              	$(me+'.SEARCH_PART.FORM').style.display='';
              }
              else {
              	// 'has parent
              	$('SearchTitle').innerHTML="";
              	$(me+'.SEARCH_PART.FORM').style.display='none';
              	
              }

              and add a DIV in Search Options, Title called SearchTitle as shown on the attached
              Attached Files

              Comment


              • #8
                Re: Hide child grid' search part.

                I am finally getting around to trying David's code and it works, but my problem is that my grid will always be opened by some parent because all grids are opened from a Main Menu grid. I'd like the grid to open with the search part showing when opened from the "main menu", but when it is called from some other grid, it will be filtered, and I don't want the search part to show. So.... I'm thinking that I need to identify the parentGridAlias for the main menu grid. I can see that Alpha is using an alias of Grid1 for it, but I think Alpha might use that for everything. So, I don't think I can put something like:
                Code:
                if myparent == 'Grid1'
                because other parent grids might have that same name.
                I'm probably being lazy, but can't seem to find how I give the main menu grid a unique alias.
                Any ideas?
                Carol King
                Developer of Custom Homebuilders' Solutions (CHS)
                http://www.CHSBuilderSoftware.com

                Comment


                • #9
                  Re: Hide child grid' search part.

                  Well, never mind. Once I published everything and tried it, my temporary alert to tell me the grid alias name showed me an alias name of _1MENUBUTT (grid's real name is 1MenuButtons). I had previously been trying it in LivePreview and it was an alias name Grid1 in the alert. So, I've changed the first If statement in David's code to the following and it's working. I'm hoping Alpha doesn't get random with the alias name.

                  if (myparent =='_1MENUBUTT') {
                  Carol King
                  Developer of Custom Homebuilders' Solutions (CHS)
                  http://www.CHSBuilderSoftware.com

                  Comment


                  • #10
                    Re: Hide child grid' search part.

                    I think the simple solution to this problem is to use the override component settings, available from the the define linked content dialog. At first this is grayed out, so you have to click the checkbox next to it. Then in the override properties dialog that pops up enter the following:

                    Code:
                    search.has_search_component = .f.
                    
                    flagMustRecalculateAllProperties =.t.
                    There are a lot of things you can do with this, have a look at the existing properties tab. I use it to hide certain columns in some grids.

                    Hope this helps.

                    Comment


                    • #11
                      Re: Hide child grid' search part.

                      Peter, Lance is right.

                      See also thread http://msgboard.alphasoftware.com/al...935#post607935

                      One can almost overide everything (gridparts, slq query / base / userfilters / show hide collums.... )
                      Yesterday we even used it to change the type of a control (label in stead of link, to disable onclick event of a control in grid that is used as standard list but also as lookup grid)

                      It will bring back my number of grids with at least 50%.

                      There is one drawback when using it for show/hide collums. If you add / remove controls to a grid you may have to redo override settings at every place used: collums are referenced by position in override settings and not by control-id. Nevertheless this is for me better than maintaining multiple almost identical grids
                      Ger Kurvers
                      Alpha Anywhere / V4.6.1.9- Build 6488
                      Development: Mysql, windows 10 64 Applicationserver: standard on Windows server 2019

                      Comment


                      • #12
                        Re: Hide child grid' search part.

                        Lance, THANK YOU. Using the Override Settings is SO logical, and I have just been completely ignoring it. Works beautifully.
                        Carol King
                        Developer of Custom Homebuilders' Solutions (CHS)
                        http://www.CHSBuilderSoftware.com

                        Comment

                        Working...
                        X