:: Forum >> Version 1 >>

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
Thursday, July 15, 2004
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)
Friday, July 16, 2004
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
Friday, July 16, 2004



This topic is archived.

Back to support forum

Forum search