c# - How to set a max rows on Telerik Grid (MVC, Razor) -


is there way set maximum of rows on telerik grid?

for example, want let customer introduce 15 rows max or minimum of 1 or throwing error maximum "x".

i found out how solve this.

.clientevents(x => {     x.onedit("checkrows");     x.ondelete("checkrows"); })  <script>  function checkrows(e) {            var grid = $('#grid').data('tgrid');         var button = $("#grid .t-grid-toolbar .t-grid-add");         if (grid.inserteddataitems().length - grid.deleteddataitems().length > 15)          {             button.hide();         }         else         {             button.show();         }       } </script> 

Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -