I can never remember if there is a method to get a list count... however, here are a couple of ways to do this...
Your code does work...
Code:
var myOb = {dialog.Object}.getControl('LIST1');
var countRec = myOb._data.length;
Outside the List control...
Code:
var x = {dialog.Object}._listViewData.LIST1.length;
where LIST1 (I believe in caps) is the name of your list control.
And inside the List, in the onListDraw event you could save the count into a {dialog} namespace variable, and then use it elsewhere.
Code:
{dialog.Object}._myListCount = data.length;
Bookmarks