Alpha Video Training
Results 1 to 4 of 4

Thread: UX LIST - How to loop through each column (not row)

  1. #1
    Member
    Real Name
    MobApp
    Join Date
    Sep 2013
    Posts
    312

    Default UX LIST - How to loop through each column (not row)

    In UX LIST Object - How to loop through each column (not record/row)? Thanks!

  2. #2
    Member
    Real Name
    MobApp
    Join Date
    Sep 2013
    Posts
    312

    Default Re: UX LIST - How to loop through each column (not row)

    I was looking for something like {dialog.object}.getControl('list1').layouts.Default.columns.length that gives me the number of columns in a layout. This is for Default layout (or use the format name for other multiple format.) Thanks.

    It worked for my loop to update some property (here width) of each column.
    var listObj = {dialog.object}.getControl('list1');
    for (i = 0; i < listObj.layouts.Default.columns.length; i++) {
    var w1 = listObj.layouts.Default.columns[i].width;
    w1_new = parseFloat(w1, 10) * 1.2 + w1.replace(/.[0-9]/g, '');
    listObj.layouts.Default.columns[i].width = w1_new;
    }
    These are pure Javascipt commands that I was able to get using firebug.
    But you may have more than one way to get represent (in Javascript) the same values that I am trying to get.
    Hopefully future releases of Alpha will still support/use this format.

  3. #3
    Member
    Real Name
    Michael Cornford
    Join Date
    Oct 2011
    Location
    East Sussex, UK
    Posts
    884

    Default Re: UX LIST - How to loop through each column (not row)

    I know it is not an answer to your question but if you have a look at my reply to this post you may decide this approach has value

    http://msgboard.alphasoftware.com/al...data-in-colors

    As you have access to the CSS of the list you can show hide columns, change widths etc by passing the info from the server.
    The question above although simple, exposes the power of passing in values to the styles property at run time.

    Michael

  4. #4
    Member
    Real Name
    MobApp
    Join Date
    Sep 2013
    Posts
    312

    Default Re: UX LIST - How to loop through each column (not row)

    Awesome - I think this will help. Reserving one field for sending the CSS information exclusively from the server and not displaying it but using it as mentioned. Thank you so much.

Similar Threads

  1. How can a UX embedded into a List row know what the row number of its row is?
    By Mike Perry in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 04-13-2014, 09:52 PM
  2. Aternate row AND column shading
    By lgrupido in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 05-14-2013, 03:27 PM
  3. Current row number in loop
    By Peter.Greulich in forum Application Server Version 10 - Web/Browser Applications
    Replies: 8
    Last Post: 11-04-2011, 11:46 PM
  4. Column and Row spacers
    By bob9145 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 09-06-2009, 11:56 PM
  5. Repeat same info in each row of a column
    By Fred M. Pfeiffer in forum Alpha Five Version 5
    Replies: 1
    Last Post: 05-02-2004, 03:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •