C# 如何在jQuery函数中查找剑道网格列?

C# 如何在jQuery函数中查找剑道网格列?,c#,jquery,model-view-controller,kendo-grid,C#,Jquery,Model View Controller,Kendo Grid,我想找到Kendo Gridview列并进行检查,以便使用它进行验证 我有以下剑道网格定义: Html.Kendo().Grid(Model.lstApproveCustReadList) .Name("ApproveCustomerMeterRead") .Columns( column => { column.Bound(e => e.REGISTRATION_ID).Width(40).ClientTemplate("

我想找到Kendo Gridview列并进行检查,以便使用它进行验证

我有以下剑道网格定义:

Html.Kendo().Grid(Model.lstApproveCustReadList)
    .Name("ApproveCustomerMeterRead")

    .Columns(
        column => {
            column.Bound(e => e.REGISTRATION_ID).Width(40).ClientTemplate(" <input id='#= REGISTRATION_ID #' type='checkbox' class='chkSel' value='#= REGISTRATION_ID #'/>").Title("Approve").Filterable(false).Locked(true).Sortable(false);
            //column.Bound(e => e.NAME).Title("Name");
            column.Bound(e => e.NAME).Width(150).Title("Name").ClientTemplate("<a href='javascript: void(0);' onclick=\"return fn_RegistrationDetailsList('#=REGISTRATION_ID#','R');\">#= NAME#</a>").HtmlAttributes(new {
                @class = "faContainer", title = " #=NAME# "
            });
            column.Bound(e => e.MPAN).Title("MPAN");
            column.Bound(e => e.NORMAL_METER_READ).Title("Normal meter read");
            column.Bound(e => e.LOW_METER_READ).Title("Low meter read");
            column.Bound(e => e.METER_READ_DATE).Title("Read date");
            column.Bound(e => e.SETTLEMENT_DATE_REGI).Title("Settlement date");
            column.Bound(e => e.REGISTRATION_ID).Title("REG_ID").Hidden(true);
            column.Bound(e => e.TariffType).Title("TariffType").Hidden(true);
            column.Bound(e => e.BILL_GENERATED).Title("Bill generated");
            column.Bound(e => e.D0071_SEND).Title("D0071_SEND");
            column.Bound(e => e.ROLECODE).Title("ROLECODE").Hidden(true);
        }
    )
Html.Kendo().Grid(Model.lstApproveCustReadList)
.名称(“ApproveCustomerMeterRead”)
.栏目(
列=>{
column.Bound(e=>e.REGISTRATION\u ID).Width(40).ClientTemplate(“”).Title(“Approve”).Filterable(false).Locked(true).Sortable(false);
//column.Bound(e=>e.NAME).Title(“NAME”);
column.Bound(e=>e.NAME).Width(150).Title(“NAME”).ClientTemplate(“”).HtmlAttributes(新){
@class=“faContainer”,title=“#=NAME”
});
column.Bound(e=>e.MPAN).Title(“MPAN”);
列绑定(e=>e.NORMAL\u METER\u READ).Title(“NORMAL METER READ”);
column.Bound(e=>e.LOW_METER_READ).Title(“LOW METER READ”);
列绑定(e=>e.METER_READ_DATE)。标题(“READ DATE”);
列.绑定(e=>e.结算日.区域)。标题(“结算日”);
column.Bound(e=>e.REGISTRATION\u ID).Title(“REG\u ID”).Hidden(true);
column.Bound(e=>e.TariffType).Title(“TariffType”).Hidden(true);
column.Bound(e=>e.BILL_-GENERATED).Title(“BILL-GENERATED”);
column.Bound(e=>e.D0071_SEND).Title(“D0071_SEND”);
column.Bound(e=>e.ROLECODE).Title(“ROLECODE”).Hidden(true);
}
)
我想在jQuery中使用剑道网格列

function SendflowAutomatically() {
    debugger;
    var RegIDs = [];
    $("#ApproveCustomerMeterRead").find("input:checked").each(function() {
        RegIDs.push($(this).val().toString().trim());
    });
    ///
    if (difference between settlement_date_regi and meter_read_date < 5) //how to use kendo columns here.
    {
        // do something

    } else {
        // format here
    }

}
函数SendflowAutomatically(){
调试器;
var RegIDs=[];
$(“#ApproveCustomerRead”).find(“输入:选中”).each(函数(){
RegIDs.push($(this.val().toString().trim());
});
///
if(结算日期与计量读数日期之差<5)//如何在此处使用剑道列。
{
//做点什么
}否则{
//格式在这里
}
}
我尝试过这样做:

//tried using this//
var rows = e.sender.tbody.children();
for (var j = 0; j < rows.length; j++) {
    var row = $(rows[j]);
    var dataItem = e.sender.dataItem(row);
    if (dataItem.get("CreatedDate")) {
        $(this).DoTheFormatting...
    }
}
//尝试使用此//
var rows=e.sender.tbody.children();
对于(var j=0;j
您的示例模型中似乎没有“CreatedDate”。是否该字段不存在,这就是为什么您尝试的结果无效?@AussieJoe hi,Aussie我的问题在于if条件。如何在if条件下使用剑道网格列