").appendTo(n.detailCell).kendoGrid({dataSource:{type:"json",transport:{read:function(t){$.ajax({url:"/MyOrderHistorys/ProductCategoryOrderHistory?categoryId="+n.data.CategoryId,dataType:"json",data:orderhistoryFormAdditionalData,success:function(n){t.success(n)}})}},serverPaging:!1,serverSorting:!1,serverFiltering:!1,pageSize:1e5},scrollable:!1,sortable:!0,pageable:!1,schema:{data:"Data",model:{id:"Id",fields:{Quantity:{type:"number",validation:{required:!0,min:1}},Sku:{type:"string",validation:{required:!0,min:1}},StockAvailability:{type:"string",editable:!1},AllowedQuantities:{type:"string",editable:!1},Batch:{type:"string",validation:{required:!0}},Batches:{type:"string",editable:!1},Multiplier:{type:"number",editable:!1}}}},columns:[{command:[{name:"addtocart",text:"Add To Cart",click:i},{name:"Delete",text:"Delete",click:t}],title:""}],editable:!0})}function t(n){n.preventDefault();var t=this.dataItem($(n.currentTarget).closest("tr"));$.ajax({cache:!1,type:"POST",url:"/MyOrderHistorys/DeleteMyOrderHistory",data:{Id:t.Id},dataType:"json",success:function(t){var i,r;t=="Success"?(i=$(n.target).closest(".k-grid").data("kendoGrid"),i.dataSource.read(),r=i.dataSource.total(),r==1&&$("#myorderhistorygrid").data("kendoGrid").dataSource.read()):alert(t)},error:function(){alert("Looks like something went wrong")}})}function i(n){var t,i;n.preventDefault();t=this.dataItem($(n.currentTarget).closest("tr"));console.log(t);i={sku:t.Sku,quantity:t.Quantity};addAntiForgeryToken(i);$.ajax({cache:!1,type:"POST",url:"/FocusPointShoppingCart/ReOrderWithQuantity",data:i,success:AjaxCart.success_process,complete:AjaxCart.resetLoadWaiting,error:AjaxCart.ajaxFailure})}$("#myorderhistorygrid").kendoGrid({dataSource:{type:"json",transport:{read:{url:"/MyOrderHistorys/MainMyOrderHistoryList",type:"POST",dataType:"json",data:orderhistoryFormAdditionalData}},schema:{data:"Data",total:"Total",errors:"Errors",model:{id:"Id",fields:{Id:{editable:!1,type:"number"},Name:{editable:!1,type:"string"},Created:{editable:!1,type:"date"}}}},error:function(n){display_kendoui_grid_error(n);this.cancelChanges()},pageSize:25,serverPaging:!0,serverFiltering:!0,serverSorting:!0},groupable:!0,pageable:{refresh:!0,pageSizes:[25,50,100],messages:{display:"Showing {0}-{1} from {2} records",empty:"No Pages",page:"Page","of":"Of",itemsPerPage:"Items Per Page",first:"First",previous:"Previous",next:"Next",last:"Last",refresh:"Refresh",allPages:"All",morePages:"More Pages"}},detailInit:n,dataBound:function(){var n=$("#myorderhistorygrid").data("kendoGrid");$(".k-master-row").each(function(){n.expandRow(this)})},scrollable:!0,columns:[{field:"CategoryName",title:"Category",width:900}]}).on("click",".btn-quote-refresh",function(n){var t=$(n.target).closest(".k-grid").data("kendoGrid");t.dataSource.read()})})