Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/268.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript telerik mvc网格中的最小-最大验证_Javascript_C#_Asp.net Mvc_Telerik Mvc - Fatal编程技术网

Javascript telerik mvc网格中的最小-最大验证

Javascript telerik mvc网格中的最小-最大验证,javascript,c#,asp.net-mvc,telerik-mvc,Javascript,C#,Asp.net Mvc,Telerik Mvc,我有一个网格,它有两个字段,分别称为最小值和最大值 @(Html.Kendo().Grid<FS.ERP.CMVC.Models.LeavePolicyDetailViewModel>() .Name("gridExample") .Columns(columns => { columns.Bound(p => p.Minimum).Width(100).HtmlAttributes(new { id = "minimum"}); columns.Boun

我有一个网格,它有两个字段,分别称为最小值和最大值

@(Html.Kendo().Grid<FS.ERP.CMVC.Models.LeavePolicyDetailViewModel>()
 .Name("gridExample")
 .Columns(columns =>
 {

  columns.Bound(p => p.Minimum).Width(100).HtmlAttributes(new { id = "minimum"});
  columns.Bound(p => p.Maximum).Width(100).HtmlAttributes(new { id = "maximum"});                                                                                                                         
  })
 .ToolBar(toolBar =>
  {
     toolBar.Create();
  })
 .Editable(editable => editable.Mode(GridEditMode.InCell))
 .Pageable()
 .Sortable()
 .Scrollable()
 .HtmlAttributes(new { style = "height:550px;" })
 .DataSource(dataSource => dataSource.Ajax()
                                     .Batch(true)
                                     .ServerOperation(false)                                                    
                                     .PageSize(20)                                                
                                            )                                         
                                            ) 
@(Html.Kendo().Grid())
.Name(“示例”)
.列(列=>
{
columns.Bound(p=>p.Minimum).Width(100).HtmlAttributes(new{id=“Minimum”});
columns.Bound(p=>p.Maximum).Width(100).HtmlAttributes(新的{id=“Maximum”});
})
.ToolBar(ToolBar=>
{
toolBar.Create();
})
.Editable(Editable=>Editable.Mode(GridEditMode.InCell))
.Pageable()
.Sortable()
.Scrollable()
.HtmlAttributes(新的{style=“height:550px;”})
.DataSource(DataSource=>DataSource.Ajax()
.Batch(真)
.ServerOperation(错误)
.页面大小(20)
)                                         
) 
我希望我的值写在最小-最大范围内。如果用户先在最小单元格中写入值,则最大值必须大于该值;如果用户先在最大值中写入值,则最小值应始终小于最大值


任何帮助都将不胜感激

在剑道网格中的save命令上,您可以实现此功能。在剑道网格中附加保存事件,如下所示

save : function (e) {
    //access both min and max value
    alert(e.values.maximum);
    alert(e.values.minimum)

    //your logic- do whater you want
    e.model.set("minimum", some value);
    }
}