Cassie Mod

Cassie Mod

  • NA
  • 488
  • 70.5k

how to load content from severak ActionNames Kendo UI

Aug 15 2017 10:14 AM

HI ive't got a strange question:

 
We have a grid with vife tappages. Every tabpages loads corretly with the function "" .LoadContentFrom, exept the CustomerInvoices. It's not showing the last to columns.  This is probably because these 2 columns use another actionname in the controller. \
 
here is my KendoTabStrip
  1. <div class="row">  
  2.     <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">  
  3.         @(Html.Kendo().TabStrip()  
  4.               .Name("CustomerDetailsTabStrip")  
  5.               .Animation(false)  
  6.               .Items(tabstrip =>  
  7.               {  
  8.                   tabstrip.Add().Text("Diensten")  
  9.                       .Selected(_currentTab == 0)  
  10.                       .LoadContentFrom(Url.Action("CustomerServices""Service"new { @id = Model.DebtorCode }));  
  11.                   tabstrip.Add().Text("Contractregels")  
  12.                       .Selected(_currentTab == 1)  
  13.                       .LoadContentFrom(Url.Action("CustomerContractLines""ContractLine"new { @id = Model.DebtorCode }))  
  14.                       .Visible(!Authenticate.HasRight(Right.ManageGo));  
  15.                   tabstrip.Add().Text("Eenmalige kosten")  
  16.                       .Selected(_currentTab == 2)  
  17.                       .LoadContentFrom(Url.Action("CustomerCosts""Cost"new { @id = Model.DebtorCode }))  
  18.                       .Visible(!Authenticate.HasRight(Right.ManageGo));  
  19.                   tabstrip.Add().Text("Facturen")  
  20.                       .Selected(_currentTab == 3)  
  21.                       .LoadContentFrom(Url.Action("CustomerInvoices""Invoice"new { @id = Model.DebtorCode }))  
  22.                       .Visible(!Authenticate.HasRight(Right.ManageGo));  
  23.                   tabstrip.Add().Text("Locaties")  
  24.                       .Selected(_currentTab == 4)  
  25.                       .LoadContentFrom(Url.Action("CustomerLocations""Location"new { @id = Model.DebtorCode }))  
  26.                       .Visible(!Authenticate.HasRight(Right.ManageGo));  
  27.                   tabstrip.Add().Text("Opmerkingen")  
  28.                         .Selected(_currentTab == 5)  
  29.                         .LoadContentFrom(Url.Action("Comments""Comment"new { @id = Model.DebtorCode, commentType = "1" }));  
  30.                   tabstrip.Add().Text("Orders")  
  31.                     .Selected(_currentTab == 6)  
  32.                     .LoadContentFrom(Url.Action("CustomerOrders""Order"new { @id = Model.DebtorCode }))  
  33.                     .Visible(!Authenticate.HasRight(Right.ManageGo));  
  34.   
  35.               })  
  36.         )  
  37.   
  38.     </div>  
  39. </div>  
 And here is the different grid with the two columns that are missing in the tabstrip. How can i fix this so it is solso showning the last two columns ?
 
  1. <div class="row">  
  2.     <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">  
  3.         <div class="hidden bg-danger" id="errorMessage"></div>  
  4.         @(Html.Kendo().Grid<InvoiceGridItem>()  
  5.                     .HtmlAttributes(new { @class = "table-responsive" })  
  6.               .Name("Grid")  
  7.               .Columns(columns =>  
  8.               {  
  9.               columns  
  10.                 .Bound(c => c.InvoiceNumber).ClientTemplate("#if (InvoiceNumber) {# <a href=\"" + Url.Action("Details") + "/#=InvoiceNumber#\">#=InvoiceNumber#</a> #}#");  
  11.               columns  
  12.                   .Bound(c => c.InvoiceDate).Format("{0:d}");  
  13.               columns  
  14.                   .Bound(c => c.CustomerDebtorCode).ClientTemplate("<a href=\"" + Url.Action("Details""Customer") + "/#=CustomerDebtorCode#\">#=CustomerDebtorCode#</a>");  
  15.               columns  
  16.                   .Bound(c => c.CustomerName);  
  17.               columns  
  18.                   .Bound(c => c.TotalExclVat).HtmlAttributes(new { style = "text-align: right;" }).Format("€ {0:n2}");  
  19.               columns  
  20.                   .Bound(c => c.TotalInclVat).HtmlAttributes(new { style = "text-align: right;" }).Format("€ {0:n2}");  
  21.               columns.Template(@<text></text>).Title(string.Empty).ClientTemplate("<a href=\"" + Url.Action("PDF""Invoice") + "/#=InvoiceNumber#\" class=\"glyphicon glyphicon-cloud-download\" target=\"_blank\" title=\"Factuur wordt getoond in nieuw venster/tabblad.\nOf klik met rechter muisknop en kies 'Opslaan als...'\"> </a>");  
  22.               columns.Template(@<text></text>).Title(string.Empty).ClientTemplate("<a href=\"\\#\" onclick=\"openInvoiceEmailDialog('#=InvoiceNumber#', '#=CustomerEmailBilling#')\" class=\"glyphicon glyphicon-envelope\"> </a>");  
  23.               if (Model.UserAllowedToSeeInvoiceDetails)  
  24.               {  
  25.                   columns.Template(@<text></text>).Title(string.Empty).ClientTemplate("<a href=\"" + Url.Action("CDR""Invoice") + "/#=InvoiceNumber#\" class=\"glyphicon glyphicon-cloud-download\" target=\"_blank\" title=\"Gespreksgegevens worden getoond in nieuw venster/tabblad.\nOf klik met rechter muisknop en kies 'Opslaan als...'\"> </a>");  
  26.                   columns.Template(@<text></text>).Title(string.Empty).ClientTemplate("<a href=\"\\#\" onclick=\"openCdrEmailDialog('#=InvoiceNumber#', '#=CustomerEmailBilling#')\" class=\"glyphicon glyphicon-envelope\"> </a>");  
  27.               }              
  28.               })  
  29.               .ToolBar(toolbar =>  
  30.               {  
  31.               toolbar.Template(  
  32.                     @<text>  
  33.                         <div class="pull-right">  
  34.                             @*<input type="date" id="invoicedDatePicker" size="30" placeholder="Factuurdatum" />*@  
  35.                             <input type="search" class="k-textbox" id="searchTextBox" size="30" placeholder="Snel zoeken" />  
  36.                         </div>  
  37.                     </text>);  
  38.               }).Selectable(s => s.Enabled(false))  
  39.                                                         .Reorderable(r => r.Columns(false))  
  40.                                                         .Resizable(r => r.Columns(true))  
  41.                                                         .Scrollable(s => s.Height("auto").Enabled(false))  
  42.                                                         .Sortable()  
  43.                                                         .Pageable()  
  44.                                                         .Filterable()  
  45.                                                         .DataSource(ds => ds  
  46.                                                             .Ajax()  
  47.                                                             .ServerOperation(false)  
  48.                                                             .Events(events => events.RequestStart("gridEventRequestStart"))  
  49.                                                             .Events(events => events.Error("gridEventError"))  
  50.                                                             .Read(read => read.Action("Index""Invoice").Data("additionalData"))  
  51.                                                         )  
  52.         )  
  53.     </div>  
  54. </div>  
 thnxx

Answers (2)