View Full Version : Check duplicate rows in ExtJs Grid

4 Sep 2012, 2:50 AM
While click add button i was add a New record for the example.,

Grid Like

Name Location

User Name Location (1.While click add i added this row with Row Editing if user click update it's update as Row).
(2.Once again If i click Add button i added the same record (User Name Location) so grid looks like

Name Location

User Name Location
User Name Location
3.I need to show the alert like already User Name available.

Thank you

4 Sep 2012, 3:46 AM
Try this:

if (store.findBy(function (rec) {
return rec.get('user') == newUser && rec.get('name') == newName && rec.get('location') == newLocation;
}) !== -1) {
// dup