setCursor/getCursor not available before binding datastore

Why is the getcursor and setcursor not available before binding the datastore to a component?

I would like to set the cursor, and afterwards open a form to show this datastore (and the record of the cursor). Is there a (better) solution than the workaround I currently use?

datastores = new Object(); datastores['item'] = new dhtmlXDataStore(); datastores['item'].load( 'connector.php' , 'xml' , function() { console.log( 'Data loaded: ' + datastores['item'].dataCount() ); // Shows "2" datastores['item'].setCursor( 1 ); // Uncaught TypeError: Object #<an Object> has no method 'setCursor' console.log( datastores['item'].getCursor() ); // Uncaught TypeError: Object #<an Object> has no method 'getCursor' });

WORKAROUND:

[code]var tmp = new dhtmlXDataStore();

datastores = new Object();
datastores[‘item’] = new dhtmlXDataStore();
datastores[‘item’].load( ‘connector.php’ , ‘xml’ , function() {

tmp.bind(datastores['item']);

console.log( 'Data loaded: ' + datastores['item'].dataCount() ); // Shows "2"
datastores['item'].setCursor( 1 ); // Works!
console.log( datastores['item'].getCursor() ); // Shows "1"

});[/code]

Hi,
getCursor/setCursor methods make sense just for collection binding (when a list of items is loaded).
But it also suppot RecordBind and ValueBind. So before binding there is no way to know which one of them user have plans to use.
So getCursor/setCursor is available just after binding.