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

Refresh / Update Grid after UX submitted

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

  • Refresh / Update Grid after UX submitted

    Hi guys …..

    I could do with some help please with refreshing a grid and repopulating a UX. I have looked through the forum and drawn a blank with an answer that solves the issue.

    I am running against a MySql Registered Users table with security using MySql tables.

    I have a grid showing the data from the Registered Users table and a UX based on the UX template “Edit account for Existing User” with the addition of a delete user security facility which is opened from a link on the grid.

    This all works … when the Edit Security UX is opened/viewed the security password and roles are populated. However when the UX is opened/viewed again the security password and role are blank.
    If the page is refreshed the UX displays correctly.

    Secondly if the security for a user is deleted the grid does not update and continues to show the user name. Once the page is refreshed the username is blank as the username field in the Registered User table is now Null – as it should be.

    Here is a video to illustrate the issue: http://screencast.com/t/SxtLpb434i2

    Any help to get the UX and grid to refresh will be appreciated.

    Thanks

    John
    John

    Currently Using Alpha ver 12.4.4.4. Build: 4346; Addins: 4889 against MySql databases

    Church Job Finder
    A Church of England Enabling Recruitment Partner "Right People, Right Place, Right Time"

  • #2
    Re: Refresh / Update Grid after UX submitted

    few questions.
    how is the ux opened, I know by clicking the link, but what kind of set up to populate the data in the ux/dialog?
    did you check to refresh the grid either that row or all the rows on closing the ux/dialog? ( to repopulate the data)
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    [email protected]
    Skype:[email protected]
    1 914 924 5171

    Comment


    • #3
      Re: Refresh / Update Grid after UX submitted

      Hi Gandhi ....

      Thanks for responding; Iím back on the case now after a short time out. Iíve managed to solve the issue regarding populating the UX with the security details by un-checking the property ďUse cached UK componentĒ on the OnClick event.

      Just need to find a way to refresh the grid when the username is set to NULL in the Registered Users table when the security is deleted.

      Originally posted by GGandhi View Post
      few questions.
      how is the ux opened, I know by clicking the link, but what kind of set up to populate the data in the ux/dialog?
      did you check to refresh the grid either that row or all the rows on closing the ux/dialog? ( to repopulate the data)
      I'm not sure what I can tell you as I used the template supplied by Alpha so I have attached a zip file of the 2 components to enable you to see what is what.

      L_Diocese_RegUser_01.11.15.zip

      I'm not sure what I am looking for. I have searched though the properites of each component and can only summise that there needs to be something on the After Diologue Validate on the UX but not sure how to go about this.

      Would be grateful for some guideance.

      Thanks

      John
      John

      Currently Using Alpha ver 12.4.4.4. Build: 4346; Addins: 4889 against MySql databases

      Church Job Finder
      A Church of England Enabling Recruitment Partner "Right People, Right Place, Right Time"

      Comment


      • #4
        Re: Refresh / Update Grid after UX submitted

        i saw your components, the way i did was.
        just like the way you have , i have a grid with a button to open a dialog to edit the web security user.
        then i define session variable to populate the controls in the dialog. so anytime i change rows the data is changed and refreshed to show the correct data.
        and when i save the i checked the box that says to refresh the grid row.
        but you are using open a dialog to edit the current record. the refresh rows method is not available in that dialog. i don't know why they did not add it.
        however if you want to keep your way of doing
        then just add e.javascript to refresh the grid after the dialog saves.
        Code:
        dim msg as c
        msg = "var po = {dialog.object}.getParentObject();"
        msg = "po.refresh();"
        e.javascript = e.javascript + crlf() + msg
        that should be able to refresh the grid.
        thanks for reading

        gandhi

        version 11 3381 - 4096
        mysql backend
        http://www.alphawebprogramming.blogspot.com
        [email protected]
        Skype:[email protected]
        1 914 924 5171

        Comment


        • #5
          Re: Refresh / Update Grid after UX submitted

          Thanks for the quick response,

          I have tried it in the Server-side AfterDialogueValidate where the data is saved and it doesn't seem to work as intended. Have I used the code in the right place? I would be grateful if you could you provide some more details on exactly where to use the code.

          Many thanks for your patience.

          John
          John

          Currently Using Alpha ver 12.4.4.4. Build: 4346; Addins: 4889 against MySql databases

          Church Job Finder
          A Church of England Enabling Recruitment Partner "Right People, Right Place, Right Time"

          Comment


          • #6
            Re: Refresh / Update Grid after UX submitted

            http://screencast.com/t/UgmaTXsEOZ
            http://screencast.com/t/Sic2oEXDKp

            I made two videos.
            the first one is what I have and works well for me using session variables to populate the dialog,
            I created a copy of a grid and a dialog (not web security related) to show if you use edit existing record method to populate the dialog then it automatically updates the current record without any additional work.
            I will take another look at your component to see any tweaking necessary.
            hope this helps.
            thanks for reading

            gandhi

            version 11 3381 - 4096
            mysql backend
            http://www.alphawebprogramming.blogspot.com
            [email protected]
            Skype:[email protected]
            1 914 924 5171

            Comment


            • #7
              Re: Refresh / Update Grid after UX submitted

              Thanks for the videos ....

              Just to clarify. I can see that the properties on the Open UK component to Edit Current Record in a Grid are the same in both yours and mine and when making a change in the UX then clicking the submit button the grid is updated.

              The issue is to do with the delete button (the red cross) that has been added to remove the security for the user (delete their security record in the security table) and sets the UserName in the Registered Users table to Null. When the red cross is clicked it closes the UX then opens a message box and asks for confirmation to remove security. Clicking OK sets the UserName in the Registered Users table to Null then removes the user from the Security Table. It is at this point the grid needs to be refreshed/updated to show the User Name as empty. It is this refresh/update of the grid that is not happening.

              Would be grateful for your thoughts.

              Thanks

              John
              John

              Currently Using Alpha ver 12.4.4.4. Build: 4346; Addins: 4889 against MySql databases

              Church Job Finder
              A Church of England Enabling Recruitment Partner "Right People, Right Place, Right Time"

              Comment


              • #8
                Re: Refresh / Update Grid after UX submitted

                Code:
                if a5ws_delete_user(Username)
                   if cn.open(connectionString)
                    cn.Execute("UPDATE registered_users SET UserName = NULL  WHERE UserName = :UserName",args)
                    cn.close()
                   end if 
                [COLOR="#FF0000"]dim msg as c
                msg = "var po = {dialog.object}.getParentObject();"
                msg = msg + "po.refresh();"
                ?msg[/COLOR]
                  end if
                I haven't test this yet, later tonight I will recreate a table to see if this works. in theory after the deletion the function sends the text to the browser to update just like e.javascript would.
                should work. as I said I haven't test his yet. I will for sure later on.

                edit: before you test this try one area:
                on the clientside event select afterAjaxcallbackComplete
                there
                you just add these javascript codes
                Code:
                var po = {dialog.object}.getParentObject();
                if (po) {
                po.refresh();
                }
                thanks for reading

                gandhi

                version 11 3381 - 4096
                mysql backend
                http://www.alphawebprogramming.blogspot.com
                [email protected]
                Skype:[email protected]
                1 914 924 5171

                Comment


                • #9
                  Re: Refresh / Update Grid after UX submitted

                  http://screencast.com/t/AqqUZ7pOga

                  take a look at this screencast and you see the grid is updated using the afterAjaxCallbackComplete event.

                  edit: even though i used {grid.object}.getParentObject(); it should have been {dialog.object}.getParentObject();

                  here is thecorrected version:
                  http://screencast.com/t/swzMlp8M
                  Last edited by GGandhi; 11-04-2015, 06:27 AM.
                  thanks for reading

                  gandhi

                  version 11 3381 - 4096
                  mysql backend
                  http://www.alphawebprogramming.blogspot.com
                  [email protected]
                  Skype:[email protected]
                  1 914 924 5171

                  Comment


                  • #10
                    Re: Refresh / Update Grid after UX submitted

                    Bingo gandhi ......

                    That works! I had not tried the afterAjaxcallbackComplete event. Simple when you know how.

                    Many thanks for your efforts and patience.

                    John
                    John

                    Currently Using Alpha ver 12.4.4.4. Build: 4346; Addins: 4889 against MySql databases

                    Church Job Finder
                    A Church of England Enabling Recruitment Partner "Right People, Right Place, Right Time"

                    Comment


                    • #11
                      Re: Refresh / Update Grid after UX submitted

                      A bit of tidying up .....

                      Gerry Brightwell came up up with a similar solution on the afterAjaxcallbackComplete event that just refreshed the row and not the whole grid.

                      Code:
                      //Get a pointer to the parent component object that opened this UX.
                      var po = {dialog.object}.getParentObject();
                      if(po) {
                      var rowNum = po._selectedRow;
                      po.refreshRow(rowNum);
                      }
                      Seems to provide a smoother operation.

                      Thanks for your help.

                      Cheers

                      John
                      John

                      Currently Using Alpha ver 12.4.4.4. Build: 4346; Addins: 4889 against MySql databases

                      Church Job Finder
                      A Church of England Enabling Recruitment Partner "Right People, Right Place, Right Time"

                      Comment

                      Working...
                      X