Get a Jumpstart with our Sample Apps
Results 1 to 2 of 2

Thread: List Control VISIBLE count? Used when a list has some rows hidden.

  1. #1
    Member CarlMPearson's Avatar
    Real Name
    Carl M. Pearson
    Join Date
    Nov 2009
    Location
    Dallas, TX
    Posts
    270

    Default List Control VISIBLE count? Used when a list has some rows hidden.

    Mobile app.

    I have a list of, say, 100 rows. However, based on criteria and button-status, I might only show a portion of them using JavaScript condition.

    It is a filter but implemented as a hide.

    _data.length and _rData.length both return 100.

    If only 15 are shown, I want to show 15/100. Well, I have the 100 value, but not the 15.

    I can count it myself with some trickery, but hope that such a value is available.

    Carl
    Dallas


    ==================== Web find ......

    07-30-2014, 07:15 AM

    there is no need for a rowcount property since you can simply get a pointer to the list and check the length of the _data property. the _data property is an array of all of the rows in the list.

    for example, say your list is called 'list1'

    alert( {dialog.object}.getControl('list1')._data.length)



    if the list has been filtered with a client side filter , the number of rows in the current view can be obtained by getting the length of the _rData array.

    var lOb = {dialog.object}.getControl('list1');
    var length = lObj._rData.length;
    Carl ~ Dallas, TX
    I'm so old that pool balls came with Roman Numerals

  2. #2
    Member CarlMPearson's Avatar
    Real Name
    Carl M. Pearson
    Join Date
    Nov 2009
    Location
    Dallas, TX
    Posts
    270

    Default Re: List Control VISIBLE count? Used when a list has some rows hidden.

    I just calculated counts as I rendered the items.
    No big deal. Fast, too.
    Carl
    Carl ~ Dallas, TX
    I'm so old that pool balls came with Roman Numerals

Similar Threads

  1. Row count on UX list control - help please? What's wrong with this code / design.
    By RobGordon in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 10-14-2014, 11:06 AM
  2. Conditionally change column width for only specific rows in a UX LIST control
    By RichCPT in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 09-27-2014, 01:54 AM
  3. how to calculate the row count (No of rows) in list.
    By PaulAmmoun in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 07-29-2014, 04:15 PM
  4. Updating LIST control fields/rows from xBasic
    By JPMPA in forum Mobile & Browser Applications
    Replies: 4
    Last Post: 03-13-2014, 02:22 PM
  5. How to control line height within a xdialog record list list box
    By Fator in forum Alpha Five Version 10 - Desktop Applications
    Replies: 12
    Last Post: 05-13-2010, 02:25 AM

Posting Permissions

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