PDA

View Full Version : enable button when grid is dirty.



29 Dec 2010, 3:21 AM
Hi ,

I need to enable button on a toolbar when a grid is dirty. Need sample code for this

Thanks ,
Mrinal

mankz
29 Dec 2010, 3:25 AM
yourButton.setDisabled(yourGrid.store.getModifiedRecords().length === 0);

Condor
29 Dec 2010, 4:10 AM
And attach this code to the datachanged and update events of the store.

(and maybe to the insert and delete events too, but those don't show up in getModifiedRecords)