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

Default Grid Filter on Opening

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

    Default Grid Filter on Opening

    I have a grid with a list of nursing home operators to whom we lease facilities. I have a check-box filter that, among other things, allows for filtering on the Status of the Operator as being either "Active", "Inactive" or "Prospective". I've set the Status initial value to "Active" hoping that when the grid is opened only the "Active" operators are initially shown. When opening the grid, the "Active" filter is correctly checked, however ALL the operators are shown and I have to click the Filter button to actually run the filter. How do I get the filter to automatically run when the grid is opened? Thanks.

    #2
    Re: Default Grid Filter on Opening

    You can set a default filter in the Query tab

    DefaultFilter.PNG
    Bill Griffin
    Parkell, Inc

    Comment


      #3
      Re: Default Grid Filter on Opening

      Bill, thanks for your response. The problem I get when filtering the grid query is that ONLY the "Active" operators populate the grid. If I then clear all filters, the grid still only shows the "Active" operators. It seems like I need some kind of ongridinitialize ajax callback to run the initial filter, or something (I'm now using developer language way above my head!).

      Comment


        #4
        Re: Default Grid Filter on Opening

        Tom,

        All you have to do is put "{grid.Object}.submitSearchForm();" in the OnGridRenderComplete client side event which basically acts as if the user clicks on the search button the first time the grid is shown.

        ogrc.png
        Frank

        Tell me and I'll forget; show me and I may remember; involve me and I'll understand

        Comment


          #5
          Re: Default Grid Filter on Opening

          Thanks Frank. Adding that event did result in the grid only showing "active" operators on initial rendering, and I thought I was done. However, when "Clear Filter Criteria" is clicked, the "Active" Status search criteria is automatically checked, I guess because it's using "Active" as a default value as opposed to just an initial value for Status. I have to manually uncheck the "Active" check box to make it go away. Either I keep the event you suggested and I do away with the "Clear Filter Criteria" link, so it's clear that the checkboxes have to be manually checked/unchecked, or I don't set the initial value of Status to "Active" and instead figure out how to do an initial search on Status = "Active". Thanks again.
          Last edited by TPeterson; 04-22-2013, 11:38 PM.

          Comment


            #6
            Re: Default Grid Filter on Opening

            Tom,
            I have a Jobs grid with a status field.
            I use the quick search in the grid properties with settings,
            position - in grid,
            position - centre,
            field(s) to search - status,
            allow QBF style - checked,
            search style - exact,
            control type - radiobutton
            choices - list type - static, choices - Active, Inactive, Prospective (for your grid, I have 4 options)
            maximum number of choices - 0
            has 'showall' button - checked
            'showall' button text - all
            initial selection - Active

            This way your grid is filtered both initially and every time the user changes the radio buttons at the top of the grid and you can use the search part of the grid with this filter intact.

            Comment


              #7
              Re: Default Grid Filter on Opening

              Lance, thanks. I look forward to trying your settings tomorrow. Looks like you're pulling an all-nighter!

              Comment


                #8
                Re: Default Grid Filter on Opening

                I have a strange body clock

                Comment


                  #9
                  Re: Default Grid Filter on Opening

                  Tom,

                  Put this in your OnGridRenderComplete client side event and set the default value for your Status search field back to NULL

                  {grid.object}.setValue('S','STATUS','Active');
                  //add 10 msec delay to be sure that the previous statement has completed
                  setTimeout("{grid.Object}.submitSearchForm();",10);


                  Although {grid.Object}.submitSearchForm() seemed to perform OK I added a 10 msec delay just to make sure that the Status field indeed has been set to 'Active' Note that the fieldname in the setValue statement must be uppercase. If you change 10 into for example 3000 you can better see what actually happens; the status field gets selected with 'Active' and after 3 seconds the search is performed.
                  Frank

                  Tell me and I'll forget; show me and I may remember; involve me and I'll understand

                  Comment


                    #10
                    Re: Default Grid Filter on Opening

                    Frank, that did the trick! It also immensely helped my understanding of Javascript event handlers. Thanks again.

                    Lance, I made a duplicate of my grid component to review your settings recommendation. I'll let you know how that turns out.

                    Comment


                      #11
                      Re: Default Grid Filter on Opening

                      Lance, I just used your settings recommendation and that worked great too. However, I've added additional filter conditions, i.e. Operator Type as "Public" or "Private", which causes me to need the full Search part. Thanks again!

                      Comment


                        #12
                        Re: Default Grid Filter on Opening

                        Glad it worked

                        Comment


                          #13
                          Re: Default Grid Filter on Opening

                          Hi,
                          I have made use of the quick search method and wondered how I would "clear" the initial setting of ACTIVE status after performing a search or a clear searches. At the moment the quick search options that have been defined as options still show ACTIVE, in this case misleading.

                          initial-state.png

                          after-search.png


                          Regards
                          Regards,

                          Kotin Karwak
                          Developer Edition
                          Version 12.3 Build 2684
                          System Addins: Build 4438
                          Build machine Windows Vista
                          Skype: mateso08

                          Comment


                            #14
                            Re: Default Grid Filter on Opening

                            Check the id of the radiobuttons using Firebug & set checked to false in for example the aftersearchsubmit event

                            var rb1 = $('GRID1.D.V.R1.CPL.1');
                            rb1.checked=false;

                            'GRID1.D.V.R1.CPL.1' is the id in my test case so that will be different for you
                            Frank

                            Tell me and I'll forget; show me and I may remember; involve me and I'll understand

                            Comment


                              #15
                              Re: Default Grid Filter on Opening

                              Thanks,
                              Still arm wrestling with this.
                              The setting .checked=false doesn't achieve result. have tried this in firebug as well.

                              Code:
                              var rb1 = $('GRID1.QUICKSEARCH');
                              rb1.checked = false;
                              console.log(rb1);
                              console.log(rb1.innerHTML);
                              I have output the innerHTML for this object as below, highlighting that the second item is selected, can't figure how to move that to the ALL settings since on clear of the selection, the intention will be that all will now be selected hence this if indicated for the qucik search options will complete the picture.
                              HTML Code:
                              "<span><input value="-999999999" name="GRID1_QUICKSEARCH" onclick="GRID1_GridObj.quickSearch($gvs('GRID1_QUICKSEARCH'));" type="radio">ALL</span>
                              <span><input checked="checked" value="ACTIVE" name="GRID1_QUICKSEARCH" onclick="GRID1_GridObj.quickSearch($gvs('GRID1_QUICKSEARCH'));" type="radio">ACTIVE</span>
                              <span><input value="INACTIVE" name="GRID1_QUICKSEARCH" onclick="GRID1_GridObj.quickSearch($gvs('GRID1_QUICKSEARCH'));" type="radio">INACTIVE</span>
                              <span><input value="PROSPECTIVE" name="GRID1_QUICKSEARCH" onclick="GRID1_GridObj.quickSearch($gvs('GRID1_QUICKSEARCH'));" type="radio">PROSPECTIVE</span>
                              "
                              Regards,

                              Kotin Karwak
                              Developer Edition
                              Version 12.3 Build 2684
                              System Addins: Build 4438
                              Build machine Windows Vista
                              Skype: mateso08

                              Comment

                              Working...
                              X