Hi, I am new to extjs.

As per the requirement when we don't have any data returned from the store, or some exception message from server, I want to display custom message or exception message sent from the server.
1. no records message could be "no records found"
2. service exception message could be "service is not avialable"

here is my code.

var accountIdStore = Ext.create('Ext.data.Store', {
id:'accountIdStore',
autoLoad: true,
model:'iOMS.model.ListAllAccountsModel',
pageSize: 10,
proxy: {
type: 'ajax',
url: '/expWeb/account/listAllAccounts.htm?contactName=114435&accountType=40001', // ,resources/json/viewAccounts.json
reader: {
type: 'json',
root: 'listaccounts',
read: function(response) {
var data =response.responseText;
alert(data);
if (data) {
return this.readRecords(data);
} else {
return this.nullResultSet;
}

}

}
}
});

for success scenario json string is:
listaccounts: { id: '101' , name: 'kiran' }

for exception scenario json string is
{success:false , errMsg:"no data" }
I am not able to display data.. please share any code how to display error message on the grid panel

Thanks in advance

-Kiran