View Full Version : Cant Load Datastore into Grid dynamically

15 Nov 2010, 12:59 AM
I love the extjs platform but need help!

What i have is a page with the grid and everything loaded already.

When I perform an action, I need to load data into my grid. The data comes down quite fine, but nothing updates in the grid !

The data store is fine if i load it initially into the grid as the ds, but obviously its not dynamic enough for me

This is the code i have :

function loadEmployee(id){
var ds = new Ext.data.Store({
autoLoad: true,
url: 'query.php?page=4&employee='+id+'&records=10',
reader: new Ext.data.XmlReader({
record: 'leaverequest',
}, ['leave_type', 'employee', 'start_date', 'end_date', 'approver', 'date_requested']),
sortInfo: {
field: 'employee',
direction: "ASC"
listeners: {
'load': function(){

var grid = Ext.get('leave_history_grid');
grid.ds = this;



PLease help :(