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

List control / Switch control events

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

    List control / Switch control events

    I'm trying the List control in-place editing for the first time, not getting what I need or expect.

    In particular (so far at least) , I've put a switch control into the row - shows up just fine. The In-place Editing Properties / Control Settings presents a list of Events. I know not every control has every event, by the Switch control doesn't seem to make use of the onChange, afterEdit, onBlur or onKeyUp events. I'd prefer to use the onChange event.

    But none of these seem to be firing. I am testing with "console.log('thiseventname');" test.

    So, how can I put a switch control on a list and have the onChange event actually firing?

    And this doesn't *have* to make use of the in-place editing if there's some other way to put a switch control (with events) into a list row.

    -Steve
    sigpic

    #2
    Are you looking for something along the lines of a button on the list? I'm not sure what you are trying to accomplish, but the below is how I edit using full screen and may help you.

    I personally do not like the in-place editing from what I have tried to build, nor do I like popup windows or a list with detail view next to it wasting my screen real estate. (This weeks Alpha Webinar has me looking forward to using the current version when the time comes though).
    I use a button on the list to delete items, and it is super easy, quick, and clean.
    I then use panel cards, and add a list event dbl click or a button labeled "edit" to slide in a new panel that lets users edit data easily that way.

    Comment


      #3
      I'm replacing a repeating section I cannot get to work in the current builds. So, for starters, I simply have a list control. It has a couple pieces of static text, and a single switch control. I want the user to be able to simply switch the value of the switch control and be able to fire a "save" event when that switch changes values. User should be able to go right on down the list, set what they want and be done.

      Snap4.png
      -Steve
      sigpic

      Comment


        #4
        Add/update:

        I created a very simple test case, attached here if anyone wants to try.

        I put javascript alert()s on the various events for the Status control - which is also the switch control. Nothing.

        _InPlaceListTest.a5wcmp
        -Steve
        sigpic

        Comment


          #5
          Steve,
          Does this help?
          Here's the code:
          setTimeout(function(){
          var statusOfStatus = {dialog.object}.getValue('list::LIST2::Status');
          alert(statusOfStatus);
          var rowText = {dialog.object}.getValue('list::LIST2::Description');
          alert(rowText);
          // put code to save list here
          },1000)
          sw.png

          Jay
          Jay Talbott
          Lexington, KY

          Comment


            #6
            Jay,

            That sort of works, but try clicking the switch more than once and it doesn't fire the second time. Also, it fires even if you click elsewhere in a new row but not on the switch.

            So if you turn a switch on, wait a moment for the alert, then switch it off again, it doesn't fire the second time.

            Also, if you had two different switches on the same line, or if you had a switch and an editable text field you would need to test old.value and new.value to figure out what had changed.

            Comment


              #7
              Steve,

              Watch this video.

              "Using in-place editing to edit data in a List based on a..." - Videos - Viddler

              I am not sure about the events you are trying to use or why you need them to work, but it certainly explains how to get the information to save, which I think in this case is the basic issue, no?

              It’s a bit round about, but it makes a certain amount of sense I suppose.

              Comment


                #8
                Hi Steve, please try this updated component. Let me know if that helps.

                Attached Files

                Comment


                  #9
                  Ferryk17, that is nice.

                  I am curious why you didn't put the javascript code in the OnUpdateRow event to save the list.

                  Is your thought to put the javascript in the Xbasic return function?

                  Jay
                  Jay Talbott
                  Lexington, KY

                  Comment


                    #10
                    Originally posted by Jay Talbott View Post
                    Ferryk17, that is nice.

                    I am curious why you didn't put the javascript code in the OnUpdateRow event to save the list.

                    Is your thought to put the javascript in the Xbasic return function?

                    Jay
                    Hi Jay, I did that to show the way get can read the values on both client side and server side.

                    Comment


                      #11
                      When I run that component out of the gate, I get an error that e._status is not found. I was able to fix it, but I am not sure I understand why what I did worked!

                      I changed the call to:

                      {dialog.object}.ajaxCallback('','','test','','_test=test&_status='+data.Status+'&_id='+data.N_ID);

                      Having the _status be first did not work right.

                      Comment


                        #12
                        You don't need inplace editing to use a switch in a list. just use the switch.
                        Insanity: doing the same thing over and over again and expecting different results.
                        Albert Einstein, (attributed)
                        US (German-born) physicist (1879 - 1955)

                        Comment


                          #13
                          Thanks all. Sorry for the day's delay in following up. Ferry - I think that'll work. I was focused too narrowly on getting the control's events to work - which still leaves me wondering but out of time to pursue further.

                          Update: Well, this just isn't fun yet. This list/example is actually a child list so it gets repopulated a whole lot. And, every time it does that, the onUpdateRow event fires.

                          Either (a) there must be some way to do this so the onUpdateRow event doesn't fire during list population or (b) my original wish of triggering a callback with the switch control's events could be used. Why would properties for events even be there if there are really no events?
                          Last edited by Steve Workings; 03-28-2021, 07:48 PM.
                          -Steve
                          sigpic

                          Comment

                          Working...
                          X