PDA

View Full Version : emptyText not working for the grid



barbara1712
6 Oct 2009, 11:09 PM
Hi,

I am using a grid panel to which the data gets rendered dynamically. I want when no records found the grid should display the message as 'No records to display'.
I have tried to use emptyText but it is not working.
The code is


viewConfig: {
forceFit:true,
enableRowBody:true,
emptyText: 'No records to display'
},
Can anyone please help me out?

Thanks

Condor
7 Oct 2009, 1:08 AM
The emptyText is displayed after the grid is loaded (and the grid has a height!).

If you also want to display the text when the grid is first displayed (but not yet loaded) then you should set deferEmptyText:false.