Alpha Video Training
Results 1 to 8 of 8

Thread: How to get rowcount of List control inside UX?

  1. #1
    Member
    Real Name
    yeo kok wei
    Join Date
    Feb 2014
    Posts
    108

    Default How to get rowcount of List control inside UX?

    How to get rowcount of List control inside UX?(Javascript)
    Last edited by wei243; 02-17-2014 at 03:57 AM.

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,819

    Default Re: How to get rowcount of List control inside UX?

    In the List Control you have an Event named onListDraw. In this event you could use data.length to get a count of the rows in the List.

  3. #3
    Member
    Real Name
    yeo kok wei
    Join Date
    Feb 2014
    Posts
    108

    Default Re: How to get rowcount of List control inside UX?

    thanks~

  4. #4
    Member
    Real Name
    Bruce Jonson
    Join Date
    May 2010
    Location
    New Zealand
    Posts
    432

    Default Re: How to get rowcount of List control inside UX?

    Thanks David, Good to know You are a clever budgie!

    Though... makes you ask why is row count not a accessible property on a list. seems like a fundamental property that Alpha and missed out providing.

    List1.RowCount

  5. #5
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,306

    Default Re: How to get rowcount of List control inside UX?

    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;

  6. #6
    Member
    Real Name
    Bruce Jonson
    Join Date
    May 2010
    Location
    New Zealand
    Posts
    432

    Default Re: How to get rowcount of List control inside UX?

    Thanks Selwyn!

    Now I know this little gem I can add to to my list of tips and tricks.

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

    Default Re: How to get rowcount of List control inside UX?

    lObj._rData.length - how do you get these properties??
    Is there a manual/documentation/link that list all the properties of say list object , container object etc, etc?
    Thanks!!

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

    Default Re: How to get rowcount of List control inside UX?

    By the way I was able to get various CSS of an Object properties elements using the program at the link below [for List I got about 215 or so css properties]
    http://acuriousanimal.com/blog/2012/...re-javascript/
    "The idea behind the code is simply: we invoke the browser function that computes the whole element’s style or, if it is not possible, retrieves the CSS properties from the style attribute."
    But not able to get all other properties. Help!

Similar Threads

  1. Property That Is Setting Cursor Inside Control
    By iRadiate in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 01-29-2014, 05:40 PM
  2. V12: List Control inside of panelcard does not scroll
    By coleresources in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 04-18-2013, 02:01 PM
  3. Why does conn.ResultSet.RowCount always returns -1?
    By ohioguy_tim in forum Alpha Five Version 10 - Desktop Applications
    Replies: 3
    Last Post: 05-17-2010, 10:17 AM
  4. 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
  5. Can I cahnge the colours inside a xdialog list box
    By Graham Wickens in forum Alpha Five Version 7
    Replies: 0
    Last Post: 01-24-2007, 06:00 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
  •