Grid groupBy not working with datastore

Sorry, I’m not seeing where to ask questions about dataStore so I hope here is okay.

I have a grid and I want to have it grouped by column 0 when it first loads, so I have:

var tasks = new dhtmlXDataStore({ url:"php/tasks.php" }); grid3.init(); dp3 = new dataProcessor("php/taskDP.php"); dp3.init(tasks); grid3.sync(tasks); grid3.groupBy(0);

It worked while I was loading with just dataprocessor/connector, but no longer does now that I’ve added dataStore. What am I doing wrong?

Try to change the code as

var tasks = new dhtmlXDataStore({ ready:function(){ grid3.groupBy(0); } }); grid3.sync(tasks); tasks.load(php/tasks.php);

It will call groupBy only after data will be available in store, which must fix the issue.