i am using this code :
grid.render('grid');
Ext.getCmp('grid').mainBody.update('<div class="x-grid-empty">' + this.emptyText + '</div>');
As per the documentation
emptyText : String Default text (html tags are accepted) to display in the grid body when no rows are available (defaults to ''). This value will be used to update the mainBody:
this.mainBody.update('<div class="x-grid-empty">' + this.emptyText + '</div>');
for me it shows
Cannot read property 'update' of undefined
Please help
this? We may need more code to go on but it looks like whateverthisis doesn't contain a definition ofmainBody- weeksdevgridclass to explain the reason behind this error. Only can be said through the piece of code you put above is thatmainBodydoes not refer a rendered object. - talha06