下面代码是一个自动填充子表的方法 新的方法需要取到Initiator的数据 把它发送给url: "/Portal/Customer/DaQuYuCeJianCha"的方法里 求大神给方法
function FuZhi() {
var Initiator;
$.ajax({
type: "get",
url: "/Portal/Customer/DaQuYuCe",
success: function (res) {
debugger;
if (res != null) {
var childTable = $("#Control13").SheetUIManager();
childTable._Clear();
$.each(res.Data,function(index,value){
childTable._AddRow();
$.MvcSheetUI.SetControlValue("Detailed.ProductCode",value.ProductCode, index + 1);
$.MvcSheetUI.SetControlValue("Detailed.ProductName",value.ProductName, index + 1);
$.MvcSheetUI.SetControlValue("Detailed.Unit",value.Unit, index + 1);
$.MvcSheetUI.SetControlValue("Detailed.SalesUnit",value.SalesUnit, index + 1);
$.MvcSheetUI.SetControlValue("Detailed.ForecastNumberMonth",value.SalesVolumes, index + 1);
$.MvcSheetUI.SetControlValue("Detailed.OnePrice",value.OnePrice, index + 1);
$.MvcSheetUI.SetControlValue("Detailed.ForecastAmount",value.ForecastAmount, index + 1);
$.MvcSheetUI.SetControlValue("Detailed.TargetOfYheMonth",value.SalesTargetThisMonth, index + 1);
$.MvcSheetUI.SetControlValue("Detailed.LastMonthsGoal",value.SalesAmountLastMonth, index + 1);
$.MvcSheetUI.SetControlValue("Detailed.YearOnYearAmount",value.YearOnYearSalesAmount, index + 1);
$.MvcSheetUI.SetControlValue("Detailed.ThisMonthsAdjustment",value.ThisMonthsAdjustment, index + 1);
$.MvcSheetUI.SetControlValue("Detailed.Initiator",value.Initiator, index + 1);
Initiator+=value.Initiator+","
alert(Initiator)
});
}
}
});