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

How to Place Button on Bottom of GRID

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

    #16
    Re: How to Place Button on Bottom of GRID

    I have added a button just like in the video that calls a javascript function 'AddNewRecord()'. I have tested it with an alert message and it works OK.

    What I want to do is open a grid component just as I would in the onclick event of a button inserted in the grid.

    I have copied the code from a button that I inserted just to get the code and pasted it into the function but nothing happens.

    Anyone have an idea of what I would have to change to make it work. I'm guessing that the object names need to be changed. But to what?

    Below is the code from the action javascript in a button I created to capture the code. Inserted into the JavaScript function declarations. I don't get any errors just nothing happens?


    function AddNewRecord {

    {grid.componentName}_G__UNBOUND_BUTTON_1_1({grid.rownumber},'{grid.rowId}',this);
    window['{grid.componentName}_G__UNBOUND_BUTTON_1_1'] = function(rowNum,rowId,objEle) {

    var windowName = 'WINDOW_2953303d_a233_405f_98b0_4ec157d4e8a8';
    var currWindow = {Grid.object}.getWindow(windowName);

    var go = new Object();
    go.objectId = objEle.id;
    go.gridName = 'brapvendadd';
    go.alias = '{Grid.componentname}_brapvendad_pdyu';
    go.submitCurrentFieldValues = true;
    go.sourceGridPart = 'G';
    go.sourceGridRowNumber = rowNum;
    go.workingMessage = '<img src=\'CSS/A5System/images/wait.gif\' />Working...';
    go.userFilter = '';
    go.baseFilter = '';
    go.arguments = '';
    go.linkDefinition = '';
    go.placeHolderValues = '';
    go.userOrder = '';
    go._thisGridAlias = {grid.object}.gridId;

    go._gridCurrentFilter = {grid.object}._gridFilter;
    go._gridCurrentOrder = {grid.object}._gridOrder;
    go._gridCurrentArguments = {grid.object}._gridArguments;
    go._gridCurrentDBType = {grid.object}._gridDBType;

    go.overrideSettings = 'Style_name = `{Grid.style}`';
    go.a5_default_path = '{grid.defaultPath}';

    go.flagTimer = 'F';
    go.flagQueryEcho = 'F';
    go.flagDebugMode = 'F';
    go.windowName = windowName;

    if(!currWindow) {
    currWindow = {Grid.object}.createWindow(windowName,'modal-resizable',
    {body: {content: {type: 'blank',
    elementId: '~'}},
    height: '5in',
    width: '8in',
    title: {html: 'Window'},
    onHide: function() {{grid.object}.refreshRow({Grid.object}._focusRow);}}
    );
    go.gridDiv = currWindow.getWindowId('body');
    {grid.Object}.openChildGrid(go);
    currWindow.show();

    } else {

    ele = '{Grid.componentname}_brapvendad_pdyu.GRID_PART.FORM_CONTAINER_DIV';
    pele = $(ele);
    pele.innerHTML = '<img src=\'CSS/A5System/images/wait.gif\' /> Working...';
    go.gridDiv = currWindow.getWindowId('body');
    go.parentGridId = '{grid.componentname}';
    window['{GRID.COMPONENTNAME}_BRAPVENDAD_PDYU_GridObj'].synchronizeGrid(go);




    };




    };
    }
    Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

    Comment


      #17
      Re: How to Place Button on Bottom of GRID

      Ok I have found the code that is causing the error: "Extra characters at the end of expression."

      dim sqlInsertStatement as c
      sqlInsertStatement = <<%txt%
      INSERT INTO co_staff_has_roles (Roles_Id_Roles, Co_Staff_Id_Staff)
      VALUES (:Roles_Id_Roles, :Co_Staff_Id_Staff)
      %txt%

      Thanks,

      Michael Carroll

      Comment


        #18
        Re: How to Place Button on Bottom of GRID

        Originally posted by frankbicknell View Post
        I have added a button just like in the video that calls a javascript function 'AddNewRecord()'. I have tested it with an alert message and it works OK.

        What I want to do is open a grid component just as I would in the onclick event of a button inserted in the grid.

        I have copied the code from a button that I inserted just to get the code and pasted it into the function but nothing happens.

        Anyone have an idea of what I would have to change to make it work. I'm guessing that the object names need to be changed. But to what?
        }
        Where have you put this code?

        Michael

        Comment


          #19
          Re: How to Place Button on Bottom of GRID

          Originally posted by MichaelCarroll View Post
          Where have you put this code?

          Michael
          I put it in the Jvascript function declarations under the grid properties.
          Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

          Comment


            #20
            Re: How to Place Button on Bottom of GRID

            I have figured out an around about way of doing it by creating a button in the grid with the proper action javascript then hide the button and steal the button tag declarations from the button in the grid and add that to the new button that i created at the bottom of the grid. It seems sloppy but it works for now.
            Thanks
            Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

            Comment


              #21
              Re: How to Place Button on Bottom of GRID

              I'm surprised you aren't getting and error from
              mystaffid="1" ' hard coded for now
              since you have it dimmed as n.
              Pat Bremkamp
              MindKicks Consulting

              Comment


                #22
                Re: How to Place Button on Bottom of GRID

                Originally posted by frankbicknell View Post
                I have figured out an around about way of doing it by creating a button in the grid with the proper action javascript then hide the button and steal the button tag declarations from the button in the grid and add that to the new button that i created at the bottom of the grid. It seems sloppy but it works for now.
                Thanks
                Frank,

                That is where I am in my process. Can you post more details?

                Thanks,

                Michael Carroll

                Comment


                  #23
                  Re: How to Place Button on Bottom of GRID

                  Originally posted by MichaelCarroll View Post
                  Frank,

                  That is where I am in my process. Can you post more details?

                  Thanks,

                  Michael Carroll
                  If you look at the html code while in the 'Preview' mode you can see all of the html, java code that is generated. If you look through the code you can find all of the controls and their settings. I just found the button i was looking for and copied the html tags for it. I wish there was a find feature for that html preview cause some pages have 1000s of line of code. That a lot of squinting and scrolling.
                  Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

                  Comment


                    #24
                    Re: How to Place Button on Bottom of GRID

                    Originally posted by MichaelCarroll View Post
                    Hello,

                    I am trying to find out how to put a button on the bottom of a grid, then have it loop through the rows and write the data to a table based on if the row has a checkmark.

                    Thanks

                    Michael Carroll
                    That is a good question - I have wondered for a while what the "Has row selector box" (or similar) option actually does, other than put a checkbox on the grid. Was there ever a plan to provide an action button linked with checked rows?

                    Comment


                      #25
                      Re: How to Place Button on Bottom of GRID

                      Originally posted by NoeticCC View Post
                      That is a good question - I have wondered for a while what the "Has row selector box" (or similar) option actually does, other than put a checkbox on the grid. Was there ever a plan to provide an action button linked with checked rows?
                      I am getting closer, but I am still having issues.

                      Comment


                        #26
                        Re: How to Place Button on Bottom of GRID

                        Originally posted by Pat Bremkamp View Post
                        I'm surprised you aren't getting and error from
                        mystaffid="1" ' hard coded for now
                        since you have it dimmed as n.
                        The truth is I am a rookie programmer - career change from IT and management. I am having a blast. However there are moments when it is a sheer guess.

                        Michael

                        Comment


                          #27
                          Re: How to Place Button on Bottom of GRID

                          Im trying to achieve the same thing as frankbicknell and it works fine when previewing the grid but when I put the component in a tabbed ui the button desnt do any thing

                          this is in my javascript declarations:
                          function nuevo(){
                          {grid.componentName}_G__UNBOUND_BUTTON_1_1(1,'R1',this);
                          };

                          I have hidden a button on the grid which contains the actual open grid code just like Frank but i think the {grid.componentName} is not resolving OK inside the tabbed UI, any ideas?
                          Cheers
                          Mauricio

                          Comment


                            #28
                            Re: How to Place Button on Bottom of GRID

                            I GOT IT !!! =)

                            the trick is to not use the javascript function declaratios when using tabbed ui components, just insert the code in the html button code

                            eg.

                            Code:
                            <span style="padding-left:20px;"><button onclick="{grid.componentname}_G__UNBOUND_BUTTON_1_1(1,'R1',this);" class="{grid.style}Button" id="{grid.componentname}.V.R1._UNBOUND_BUTTON_1">Nuevo</button></span>
                            Cheers
                            Mauricio

                            Comment


                              #29
                              Re: How to Place Button on Bottom of GRID

                              i attempted to add the button at the bottom of a grid to call AJAX to run xbasic script, however, when i click on the button, i'm getting the following error:

                              this._newValues is undefined
                              firefox shows the error on this line:

                              for(var i = 0; i < this._newValues.length; i++) {

                              does anyone have a suggestion as to what i've missed? i've run through the tutorial on tutorials.micromediastudios.com a few times, and don't see anything missing in the steps.

                              Thanks,

                              robert
                              Earl Allin
                              REAInc.net

                              We can help you with mentoring and custom programming services in Alpha, .NET, React, PHP, ColdFusion, and more..

                              Comment


                                #30
                                Re: How to Place Button on Bottom of GRID

                                I am in the smiler type of situation, I want to submit 2 field values out of the 6 fields in a records on a Grid to the BackEnd SQL DB. I want to put this Event onClick on the Button in row on Grid.

                                Comment

                                Working...
                                X