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

Grid Submit to refresh Search Part

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

    Grid Submit to refresh Search Part

    Hi I am trying to get a dropbox which is filtered by lines in the grid but once I submit the grid I need to have the search part refresh just like the grid does on submit. Even though in the update properties says fullpage but it is only any grids and not the search parts. I would imagine this would be in the
    client side area under after submit grid and or after submit record.

    Thanks for looking
    Chad Brown

    #2
    Re: Grid Submit to refresh Search Part

    Really nobody?
    Chad Brown

    Comment


      #3
      Re: Grid Submit to refresh Search Part

      Just a quick look before quitting tonight Chad.

      Does {grid.Object}.clearSearchForm(); work?

      I'm not positive I understand what you want here though. Do you want the dropbox values to change?
      -Steve
      sigpic

      Comment


        #4
        Re: Grid Submit to refresh Search Part

        Thanks, Steve but no it doesnt the problem is that there is a hidden dropdown which is a parent object. It is set originally to be a session variable so if you use clear it wipes it out. That kills the cascading dropdown which is also in the search. I am needing something like

        grid.Object}.refreshSearchForm();

        But I am not sure if this will get me the proper result yet, it may wipe out the variable too.
        Chad Brown

        Comment


          #5
          Re: Grid Submit to refresh Search Part

          Just spent some time looking through the DOM for a grid with a searchpart, and can't find anything. That doesn't mean it's not there - I just don't see it.

          And you already know this: When you can't find a way to do what you want, it may be time to look at an alternative to achieve the same goal. Or, write your own javascript for it.
          -Steve
          sigpic

          Comment


            #6
            Re: Grid Submit to refresh Search Part

            Originally posted by chadbrown View Post
            Hi I am trying to get a dropbox which is filtered by lines in the grid but once I submit the grid I need to have the search part refresh just like the grid does on submit. Even though in the update properties says fullpage but it is only any grids and not the search parts. I would imagine this would be in the
            client side area under after submit grid and or after submit record.

            Thanks for looking
            Chad, I keep reading this but I don't understand... my brain's fuzzy these days... it's the weather. Could you detail it a bit more?

            Comment


              #7
              Re: Grid Submit to refresh Search Part

              ok I have a grid that has a search part, the search part has 2 fields one is a dropbox that is hidden and has an initial value of session.t_id which equals 1 say.
              the second is a dropbox which is filtered off of the parent dropbox which as i say is hidden. This should only return a dropbox which has values that are in session.t_id =1.
              Once the grid opens and you search it returns the proper dropbox values. Now in my grid its filtered by the value used in the second dropbox. I update items in the grid which once its been submitted refresh the grid <fullpage> in the update properties area.
              Because those items no longer pass the filter for the grid the dropbox should not be cached, and only show items available for the grid.

              What I need the grid to do on submit is to refresh the entire grid including the search area and it doesnt. Also if you have a clear search and you click it the hidden value in the parent gets wiped out which makes the dropdown box empty.

              Obviously on the update properties section says refresh <fullpage> it's not doing it.

              Hopefully my blabbering makes some sense.
              Chad Brown

              Comment


                #8
                Re: Grid Submit to refresh Search Part

                Hope you don't mind... going to re-interate.

                Parent dropdown is hidden and has a value of session.t_id (when the grid is opened this is set to 1)
                Child dropdown choices are filtered against the parent dropdown.

                The grid search is done and records are displayed which satisfy Parent and Child dropdowns

                You makes changes to some records which will no longer satisfy the current search and submit.

                Are changes made to the session.t_id? Is that why you want the search part refreshed?

                Anyway... you want the Search part refreshed so that the Parent dropdown will be whatever session.t_id is, and the Child dropdown will now be filtered on the Parent, and you can do a new search.

                Is that right?

                Comment


                  #9
                  Re: Grid Submit to refresh Search Part

                  Parent dropdown is hidden and has a value of session.t_id (when the grid is opened this is set to 1)
                  Child dropdown choices are filtered against the parent dropdown.

                  The grid search is done and records are displayed which satisfy Parent and Child dropdowns Correct

                  You makes changes to some records which will no longer satisfy the current search and submit. Correct

                  Are changes made to the session.t_id? Is that why you want the search part refreshed? The session doesnt change just the child dropdown now has the items that now dont satisfy the search criteria removed.

                  Anyway... you want the Search part refreshed so that the Parent dropdown will be whatever session.t_id is, and the Child dropdown will now be filtered on the Parent, and you can do a new search. Correct

                  Is that right?[/QUOTE]

                  Thanks it all works in my head my and not to my fingertips.
                  Chad Brown

                  Comment


                    #10
                    Re: Grid Submit to refresh Search Part

                    Basically on submit I want the whole grid to refresh not just the grid view. Also this is all in a tabbedui.
                    Chad Brown

                    Comment


                      #11
                      Re: Grid Submit to refresh Search Part

                      Ok... I think this works the way you'd like.

                      This is working in just the grid, not inside a tabbedui, but it's just an element Id you'll need it find and change.

                      Also, this is working off the full Grid Submit, not the single row save... but again, you can run it anywhere you like.

                      The basic idea is that once the submit happens we repopulate the Child Search dropdown with only those records that now satisfy the Parent filter... and reset the grid records with an auto search.

                      Thanks, once again, to Selwyn for providing the excellent dialog repopulate dropdown videos

                      I put this code into the Grid, Client-side Events, afterGridSubmit event

                      Code:
                      {grid.Object}.ajaxCallback('S',1,'searchList');
                      And, in the XBasic Functions, this...

                      Code:
                      function searchList as c (e as p)
                      	
                      dim list as c
                      dim currProd as c
                      
                      currProd = e.S.ProdId
                      
                      dim cn as sql::Connection
                      dim args as sql::Arguments
                      dim sql as c
                      dim flag as l
                      
                      sql = "select ProdId, OrderId from tblOrders Where ProdId = :whatProdId"
                      args.add("whatProdId",currProd)
                      
                      flag = cn.open("::Name::YOURSAVEDCONNECTIONNAME","YOURLOGINID","YOURPASSWORD")
                      if flag = .f. then
                      	searchList = "alert('Could not open database');"
                      	exit function
                      end if
                      
                      flag = cn.execute(sql,args)
                      
                      if flag = .f. then
                      	cn.close()
                      	searchList = "alert('Could not execute SQL statement');"
                      	exit function
                      end if	
                      	
                      dim rs as sql::ResultSet
                      rs = cn.ResultSet
                      
                      flag = rs.nextRow()
                      if flag = .f. then
                      	'no records in resultset
                      	cn.FreeResult()
                      	cn.Close()
                      	searchList = ""
                      end if	
                      
                      dim txt as c
                      txt=""
                      while flag
                      	txt = txt + "['" + js_escape(rs.data("OrderId")) + "']" + crlf()
                      	flag = rs.nextRow()
                      end while
                      
                      list = "[" + crlf_to_comma(txt) + "]"
                      
                      dim js as c
                      
                      js = "A5.form.populateSelect('{Grid.ComponentName}.S.ORDERID',''," + list + ",true);{grid.Object}.submitSearchForm();"
                      
                      searchList = js
                      	
                      end function
                      Here, ProdId is the Parent Search Dropdown. OrderId is the Child Search Dropdown. ProdId I set just to the value of 1. So, all Orders are displayed where they have a ProdId of 1. The OrderId dropdown is filtered to those OrderId's where the ProdId is 1. You change a ProdId, in the Grid, to 2, and Submit, and the Child Dropdown gets repopulated, with 1 less record.

                      Hope it helps get you closer.

                      Comment


                        #12
                        Re: Grid Submit to refresh Search Part

                        Thanks for all that I will give it a go.
                        Chad Brown

                        Comment

                        Working...
                        X