PDA

View Full Version : Dynamic empty text for grids



icechathuranga
7 Dec 2012, 2:04 AM
Can't we change the empty text of a grid dynamically. is there a proper method to do it.
for example one empty text for when data is empty, one for after applying a filter and data is empty.

thank you

mitchellsimoens
9 Dec 2012, 8:05 AM
You may have to change the el also.

icechathuranga
10 Dec 2012, 2:00 AM
Thanks,

here what i did,

var grid=this.up('grid'),
view=grid.getView();
if(view){
view.emptyText="SAMPLE EMPTY TEXT";
view.refresh();
}

Ilay
10 Dec 2012, 2:04 AM
Maybe it helps:
http://www.sencha.com/forum/showthread.php?249993-Set-an-empty-text-to-grid-if-store-has-an-exception