PDA

View Full Version : How to display the success message from the return JSON object in grid?



bryanevil
22 Jul 2010, 9:50 PM
How to display the success message from the return JSON object in my grid? Could I get a small example please? I couldn't find any demo.

my reader:

var MembershipReader = new Ext.data.JsonReader({
totalProperty: 'TotalCount',
successProperty: 'success',
root: 'Data',
idProperty: 'UserName',
messageProperty: 'ResponseMessage',
fields: ['UserName', 'Email', 'IsApproved', 'IsLockedOut', { name: 'CreateDate', type: 'date', dateFormat: 'M$' }, { name: 'LastLoginDate', type: 'date', dateFormat: 'M$' }, 'Comment']

});

my grid:

tuv.grid.membershipGrid = Ext.extend(tuv.grid, {
store: MembershipJsonStore,
columns: MembershipColumns,
autoExpandColumn: 'UserName',
// stateId: 'membershipGridstate',

bbar: new Ext.PagingToolbar({
pageSize: tuv.pagesize.membership,
store: MembershipJsonStore,
displayInfo: true,
displayMsg: 'Displaying topics {0} - {1} of {2}',
emptyMsg: "No topics to display"
})
});

mankz
23 Jul 2010, 12:01 AM
Where in your grid do you want to show it? In grid cell?

bryanevil
23 Jul 2010, 12:24 AM
I am using the example msg box to display info - Ext.example.msg('Write', ''); it is cool

bryanevil
23 Jul 2010, 6:26 PM
still looking for help please