Is there a way to set a maximum of rows on a grid?
For example, i just want to let a customer introduce 15 rows max or a minimum of 1.
Regards,
Cameron CB
2 Answers, 1 is accepted
0
Sebastian
Telerik team
answered on 19 Apr 2013, 01:47 PM
Hello Cameron,
This should be possible if you implement the following checks when items are inserted or deleted in the grid data source:
When new items are inserted, validate whether the items in the grid source are less than 15. If not, cancel the insert operation and display a user-friendly message to indicate that the action was aborted.
When the user attempts to delete a grid item, verify that there is more than one item in the grid. If not, cancel the delete operation and display a user-friendly message to inform the user that the action was aborted.
Try this out and let me know if I am leaving something out.
Regards,
Sebastian
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.