user3458700
user3458700

Reputation: 27

restrict jsgrid to add new row when it is empty

I am using JSGrid in our application. When I am adding new row by clicking + button, even if data is not entered in the grid, jsgrid is adding that empty row. So, do we have a function where we can verify and restrict these sort of adding empty rows in jsgrid

Upvotes: 0

Views: 672

Answers (1)

Michael Horn
Michael Horn

Reputation: 4089

Have you tried adding the validate property to your required fields?

I.e.

fields: [
        { name: "Name", type: "text", width: 150, validate: "required" },
        { name: "Age", type: "number", width: 50, validate: "required" }
]

Upvotes: 1

Related Questions