The typical way I've gotten the number of rows in a list control to display like in a grid is to create a static text control above the list such as
<span id="{dialog.componentname}.JOBLIST.RECORDCOUNT"></span> Projects Listed
However, when populating the list using an sql statement like below in a callback, this doesn't change
if cnx.execute(sql,args)
crs = cnx.ResultSet
json = crs.ToJSONObjectSyntax()
json = strtran(json,crlf(),"," + crlf())
json = "[" + rtrim(json,",") + "]"
js = "var lObj={dialog.object}.getControl('JOBLIST');"+crlf()
js = js+"var _data="+json+crlf()
js = js+"lObj.populate(_data);"
cnx.FreeResult()
This method allows the user to select, for example, all the projects for a person or all active projects or all completed projects using a simple dropdown box, which is great for us, but the static text does not change.
Any list experts that can give me a solution?
Bookmarks