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



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

help with tree view control

  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Re: help with tree view control

    I have worked through this and can make most things work.

    However the onClick and attributes are just not working for me.

    I am sure it is a simple syntax problem.

    This works

    { icon: \'cssIcon=fa fa-folder\' , collapsedIcon: \'cssIcon=fa fa-folder\', expandedIcon: \'cssIcon=fa fa-folder-open\' , initialState: "open", value: "Hello" }

    With the genie I can use the onClick event

    So onClick (Genie based) I have


    function func(txt){ alert(txt);} the alert returns "value" the variable "we".

    The JSON from the component is

    html: 'parent',
    value: 'we',
    icon: 'cssIcon=fa fa-glass',
    collapsedIcon: 'cssIcon=fa fa-folder',
    expandedIcon: 'cssIcon=fa fa-folder-open',
    onClick: function(dn) {func(this.value);}, // I cannot get this section to work when I build with xBasic.
    children: [
    html: 'child',
    icon: 'cssIcon=fa fa-folder-open'

    Also I cannot get this to work when passing from the server.

    {icon: 'myIconA', onClick: 'alert("You clicked on Alpha-1");'}


    • #17
      Re: help with tree view control

      Here's the complete construct from mine - might help?

      				ele_value = "G|" +"Group_Number") + "|" +"Type") + "|" +"Value")		'example: G|1|L|3
      				*concat(js, "	{" + crlf())
      				*concat(js, "		html: '" +"element_name") + "'," + crlf())
      				*concat(js, "		value: '" + ele_value + "'," + crlf())
      				if"Type") = "L"
      					*concat(js, "		icon: '" + img_location + "'," + crlf())
      					*concat(js, "		icon: '" + img_animal + "'," + crlf())
      				end if
      				*concat(js, "		onClick: function() {{dialog.object}.buttonClick('BUTTON_CLICKTREE'); }" + crlf())


      • #18
        Re: help with tree view control

        Here is a section of my xbasic tree builder code. Maybe you can get something out of this.

        		if loadTxt03
        			txt = txt + "<font class='treeNode1'>WORK ORDERS</font>" + crlf()
        			sqlStatement = <<%sql%
        				select long_tree, slid, logno, fileas, closed from v_cbo_wono where cid = :maCID order by logno desc %sql%
        			OK = cn.Execute(sqlStatement,myargs)
        			rsc = cn.ResultSet
        			txt = txt + tab1 + "<font class='treeNodeLabel2'>" + "NEW WORK ORDER RECORD" + "</font>" +\
        			"{icon: 'add-16.png', onClick: '{dialog.object}.ajaxCallback(\'\',\'\',\'xbOpenWoAdd\',\'\',\'_nCID="\
        			+ rsp.Data(2) + "&_cFileAs=" + rsp.Data(1) + "&_nJID=" + "" + "&_cJname=" + "" + "\') ;'}" + crlf()
        			while rsc.nextrow()
        				txt = txt + tab3 + "<font class='treeNodeLabel2'>"
        				if rsc.Data(5) = .t.
        					txt = txt + tab3 + "<font class='treeNodeLabel3'>"
        				end if
        				txt = txt + rsc.Data(1) +"</font>" +\
        				"{icon: 'form2.png', onClick: '{dialog.object}.ajaxCallback(\'\',\'\',\'xbOpenWoEdit\',\'\',\'_nCID="\
        				+ rsp.Data(2) + "&_nSlID=" + rsc.Data(2) + "&_cWoNo=" + rsc.Data(3) + "&_cFileAs=" + rsc.Data(4) + "\') ;'}" + crlf()
        			end while ' work orders
        		end if
        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.


        • #19
          Re: help with tree view control

          Frank (and anyone else) --

          After I posted mine, and after reading yours, I think even simpler syntax could be to call a saved javascript action. That way all we have to do is call

          It's what I'm aiming for next time, and maybe amend my current stuff one of these days. It should simplify the coding here somewhat.


          • #20
            Re: help with tree view control

            I agree only I am not sure of how to pass the data from the select statement to the action Javascript. It certainly would make the code much easier to read.

            The way I have it working is that I take the data submitted in the callback set session variables in the callback that are then used in the action javacript to open the correct ux for adding or editing.

            It seems that there is a step that is not necessary but that is the only way I can make it work for me now.

            I wonder if I can set session variables and run the action jacascript without a callback in the onClick...hmmm......
            Last edited by frankbicknell; 02-15-2016, 09:53 AM.
            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.


            • #21
              Re: help with tree view control

              This approach is working OK

              I have added a couple of client side hidden controls in the tree view ux to accept the data and to set the arguments in the child ux. No callback needed here.

              txt = txt + tab1 + "<font class='treeNodeLabel2'>" + "NEW JOB RECORD" + "</font>" +\
              "{icon: 'add-16.png', onClick: '{dialog.Object}.setValue(\'cid\',"+ rsp.Data(2) +");{dialog.object}.runAction(\'open_job_add\');'}" + crlf()
              Last edited by frankbicknell; 02-16-2016, 11:52 AM.
              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.


              • #22
                Re: help with tree view control

                Just an fyi for anyone experimenting with the treeview control.

                I have found that there is a limit to the number of characters you can have in any particular branch statement. I guess it is 254. If you go above that the tree will not render and you get no errors.
                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.


                • #23
                  Re: help with tree view control

                  Frank - most of us know that's another way of saying "geez did I spend a lot of time to figure *that* out!". All the more reason to get what you can of this to call some saved javascript action or similar.



                  • #24
                    Re: help with tree view control

                    yes after "i spent a lot of time figuring this out" I have it working very well now. It is smooth and very fast, functional and they like it..
                    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.


                    • #25
                      Re: help with tree view control

                      Is there a way to refresh just the tree control?


                      • #26
                        Re: help with tree view control

                        What I do is just make an ajaxcallback to the function that builds the tree.
                        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.


                        • #27
                          Re: help with tree view control

                          Thanks Frank......mine is a basic static tree control I am using for a nav menu in a mobile app. I ended up just adding an e.url after login event that basically forces the page to refresh.

                          I am using security groups on some of the tree control choices and even though I logged in, the security wasn't being recognized without a refresh. I would love if the nested list genie or the viewbox control had security group options applied to them, but so far it only appears in the tree control. Seems like this would be a common need for developers.......maybe I am missing something obvious???


                          • #28
                            Re: help with tree view control

                            Hi Frank,
                            How did you get the different font styles on the tree nodes?


                            • #29
                              Re: help with tree view control

                              I have put the tree control aside for now. It was too cumbersome and hard to maintain for me and I was not able to get the results that I wanted. You can specify fonts in the code that builds the tree structure. I created some different 'font' classes and set the font classname in the HTML code.
                              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.