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 Record List - List Box Control

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

    Refresh Record List - List Box Control

    How do I refresh data in a Record List - List Box Control that is inside of an Xdialog.

    I see that there is an option to watch a variable when you place this object on a form but not in an Xdialog.

    I can't seem to figure out the Xbasic they are using to do this.

    #2
    Re: Refresh Record List - List Box Control

    I can't see how to do this either since a refresh doesn't seem to work. This is an embedded Xdialog Record-List List box supercontrol?

    This is from Selwyn, back in 2004...

    "I have spent quite a bit of time looking at your script.

    Basically the problem is that you are using a Record_list-List box to display the data. The problem is that there is no way that I know of to tell the record-list list box that the underlying table has changed.

    I suggest that instead of using a record-list list box, that you use a regular list box. The you have full control over populating the list box, and then, when your script that adds a new entry to the table is completed, you can write the xbasic that repopulates the listbox."

    I've searched the related forum messages and it seems there hasn't been much luck in doing this.

    Comment


      #3
      Re: Refresh Record List - List Box Control

      Yes this is in an xDialog.

      I've used regular text boxes in the past and Sewlyn is correct. Its easy to use xBasic to change the data.

      But in this case, I was looking to use a nicely formatted multi-column text box, so I chose a Record List - List Box.

      I was just curious since there is a way to do it when it is embedded in a form.

      Comment


        #4
        Re: Refresh Record List - List Box Control

        I guess I don't understand the question and issue. A record list-list box populated automatically from the values of a table is an instantaneous snapshot of the values in the table in columnar fashion within a modal object. No action can proceed until that xdialog is closed. So what change in the table is expected? On a network? You could put a button on the xdialog for the user to execute a refresh (see attached).

        A bit ago I had a script that Dr. Wayne and others on this board were going through that refreshed a modeless dialog. I'll see if I can find it and see what can be done with that, some.
        Mike W
        __________________________
        "I rebel in at least small things to express to the world that I have not completely surrendered"

        Comment


          #5
          Re: Refresh Record List - List Box Control

          It looks like this will work.

          Basically it is just closing the xdialog and reopening it.

          The reason I need to refresh it is becasue they are removing items from the table using the Record List - List Box. So I needed to refresh the data when they remove that item.

          Comment


            #6
            Re: Refresh Record List - List Box Control

            I will do a bit of looking also as I would like to refresh a multi-select checkbox xdialog...without having to close and reopen it.



            LATER: no luck in finding anything. Came close experimenting but nothing yet. Hopefully Mike has better luck (expertise) than I.
            Last edited by MikeC; 08-14-2009, 01:05 PM.
            Mike
            __________________________________________
            It is only when we forget all our learning that we begin to know.
            It's not what you look at that matters, it's what you see.
            Henry David Thoreau
            __________________________________________



            Comment


              #7
              Re: Refresh Record List - List Box Control

              Originally posted by jdrake View Post
              I was just curious since there is a way to do it when it is embedded in a form.
              How is it done when embedded in a form... that's how I first thought you were using it. I didn't have any luck doing that so would love to know.

              Comment


                #8
                Re: Refresh Record List - List Box Control

                Just a little bit confused still... are you using an embedded xdialog record-list list box... or a popup xdialog record-list list box?

                If you're using a popup xdialog then here's how to create a modeless xdialog record-list list box and allow a user to delete an item and have the xdialog refresh the list. Basically you're deleting the record, rebuilding the keylist and refreshing the xdialog.

                The credit goes to Jerry Brightbill, Alpha5, from a 2003 post.

                Code:
                'Create an XDialog dialog box to prompt for parameters.
                DIM SHARED varList as C
                DIM SHARED varC_result as C
                ok_button_label = "&OK"
                cancel_button_label = "&Cancel"
                delete_button_label = "&Delete"
                DIM varList_rl_def as C 
                dim tbl as P
                dim indx_1 as P
                
                varList_rl_def = "kl=tblcategories,{keylist_build(\"H=.05,1:25[Category]\",''+Category,left(''+Category,25))}{}"
                'varC_result = ui_dlg_box("Category List",<<%dlg%
                varc_result = ui_modeless_dlg_box("Category List",<<%dlg%
                {can_exit=ok}
                {region}
                Type prompt here:| [%@varList_rl_def%.40,5varList];
                {endregion};
                {line=1,0};
                {region}
                <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL> <15=delete_button_label!DELETE>
                {endregion};
                %dlg%,<<%code%
                IF a_dlg_button = "DELETE" then
                    'ui_msg_box("Category Delete", varList)
                	tbl = table.open("tblCategories")
                	indx_1 = tbl.index_primary_put("Category")
                	tbl.fetch_find(varList)
                	tbl.change_begin()
                	tbl.delete()
                	tbl.change_end(.t.)
                	tbl.close()
                    varList_rl_def = "kl=tblcategories,{keylist_build(\"H=.05,1:25[Category]\",''+Category,left(''+Category,25))}{}"
                    ui_modeless_dlg_refresh("Category List")
                end if
                IF a_dlg_button = "OK" then
                    ui_modeless_dlg_close("Category List")
                end if
                %code%)

                Comment


                  #9
                  Re: Refresh Record List - List Box Control

                  I found 2 functions that, by rights, should refresh a modal xdialog...but cannot get them to work. The UI_DLG_REFRESH_TARGETED() function takes a crlf variable representing one or more controls as its second argument. Maybe I am not recognizing what a control is?? I would think the control would be say this:
                  Code:
                  [%d;O={@@}%.160,20Sel_Comp^$$a_Sel_Comp]
                  http://support.alphasoftware.com/alp...TARGETED().htm

                  http://support.alphasoftware.com/alp..._REFRESH().htm

                  If anyone has used either of these two functions with success, please advise.
                  Mike
                  __________________________________________
                  It is only when we forget all our learning that we begin to know.
                  It's not what you look at that matters, it's what you see.
                  Henry David Thoreau
                  __________________________________________



                  Comment

                  Working...
                  X