3.2.0

obj.getDataProperty('count') returning 0 ?

Me again,

In the given example /examples/grid/basic.htm add a button like this

<input type="button" onclick="alert(obj.getDataProperty('count'))" value="Show Count" />


When clicking, it pops '0' :-(

All I want is to get the row count using grid object. What is wrong here?

Thanks in advance.
Sudhaker Raj
July 15,
This example sets the number of rows directly on the row model ignoring the data/count property:
obj.setRowProperty("count", 20);


You can modify the example code like this:
obj.setDataProperty("count", 20);

In this case the row model will get the number of rows from data model (default behavior) and your code will work as well.

Alex (ActiveWidgets)
July 16,
Great !!! Working ;-)

Does this mean that the preffered method for setting row-count should be following?
obj.setDataProperty("count", XXX);


Any reason behind setting row/count in your example?
Sudhaker Raj
July 16,

This topic is archived.

See also:


Back to support forum