I am using Kendo MVVM. This ApisTemplate is called Remotely and It opens up. Problem is in "PaxPreferenceTemplate" template. There 2 source binding. Only 1st works i.e know Even if you use <label data-bind:"text: Segment.SegmentDetailsToDisplayPricing" ></label> still result would be same.
Please tell what would be correct way
Note: ALL below code is in 1 file.
<
script
id
=
"ApisTemplate"
type
=
"text/x-kendo-template"
class
=
"KendoExtTemplate"
>
<
div
>
<
div
data-bind
=
"source: ApisVMList.PaxPreferenceBySegment"
data-template
=
"PaxPreferenceTemplate"
></
div
>
<
div
style
=
"text-align:center;"
>
<
button
type
=
"button"
id
=
"btnIssueTicket"
onclick
=
"SaveIssueTicket(this)"
class
=
"k-button k-primary Apis_submit "
style
=
"width: 100px; height: 25px; margin-right: 5px;"
>
<
i
class
=
"fa fa-floppy-o fa-inverse"
aria-hidden
=
"true"
></
i
> Save
</
button
>
<
button
type
=
"button"
class
=
"k-button "
onclick
=
"CloseApisWindow(this)"
style
=
"width: 100px; height: 25px;"
><
i
class
=
"fa fa-ban"
></
i
> Cancel</
button
>
</
div
>
</
div
>
</
script
>
<
script
id
=
"PaxPreferenceTemplate"
type
=
"text/x-kendo-template"
class
=
"KendoExtTemplate"
>
<
div
data-bind
=
"source: Segment"
data-template
=
"SegmentTemplate"
></
div
>
<
div
data-bind
=
"source: PaxInfo"
data-template
=
"PaxInfoTemplate"
></
div
>
</
script
>
<
script
id
=
"SegmentTemplate"
type
=
"text/x-kendo-template"
class
=
"KendoExtTemplate"
>
<
label
data-bind
=
"text: SegmentDetailsToDisplayPricing"
></
label
>
</
script
>
<
script
id
=
"PaxInfoTemplate"
type
=
"text/x-kendo-template"
class
=
"KendoExtTemplate"
>
<
div
>
<
label
data-bind
=
"text: Pax.PersonName"
></
label
>
<
input
data-role
=
"dropdownlist"
data-text-field
=
"PassportNumber"
data-value-field
=
"PassportNumberID"
data-bind
=
"source: PossiblePassports"
/>
<
input
data-role
=
"dropdownlist"
data-text-field
=
"FrequentFlyernumber"
data-value-field
=
"FrequentFlyernumberID"
data-bind
=
"source: PossibleFrequentFlyers"
/>
</
div
>
</
script
>
Is there a way to customize the UI of kendo upload to show the failed uploads in a different list and succeeded ones on another? Like the following..
You are currently uploading 3 files
Failed : 2
Succeeded : 2
Uploading...
doc1
doc2
doc3
Failed
doc4
doc5
Completed
doc6
doc7
i'm writing a website using kendo grid, and now i'm stuck in displaying the Selective Data when i chose an item on the drop down list, i don't use the Filter action but instead i'm using a Ajax which will call my Jsonresult in the controller. How to make the grid show those items ?
Here is the method in my Controller :
public JsonResult LoadSelection(Categories Option)
{
try
{
List<Product> ls = new List<Product> { };
foreach (var item in db.Product.ToList())
{
if (item.Cate_ID== Option.Cate_ID)
ls.Add(item);
}
return new JsonResult()
{
Data = ls,
MaxJsonLength = Int32.MaxValue,
JsonRequestBehavior = JsonRequestBehavior.AllowGet
};
}
catch (Exception e)
{
return Json(e.Message);
}
and here is my dropdownlist handler :
var dropdown = grid.find("#Item").kendoDropDownList({
dataTextField: "Cate_ID",
dataValueField: "Cate_ID",
autoBind: false,
optionLabel: "All",
dataSource: Shared_Data,
change: function () {
var value = this.value();
if (value) {
Selected_Data = value;
$.ajax({
data: {"ID_LoaiKH":Selected_Data },
url: "/Product/LoadSelection",
type: "GET",
dataType: "json",
success: function()
{
$("#grid_1").data('kendoGrid').dataSource.read();
}
});
Hi,
I have a problem to get the inner items of hierarchical grid.
This is the main grid:
@(Html.Kendo().Grid(Model.List1)
.Name("List1")
.Columns(columns =>
{
columns.Bound(p => p.ColA).Title("ColA").Width(135);
columns.Bound(p => p.ColB).Title("ColB").Width(110).Template(@<text>
<a href='\\#' class='link' style="color:red;" onclick='UpdateItem(@item.ColC) '>@item.ColC</a>
</text>);
})
.Pageable()
.Sortable()
.Groupable()
.DataSource(dataSource => dataSource.Server().PageSize(5))
.HtmlAttributes(new { style = "height:500px;" })
.DetailTemplate(
@<text>
@(Html.Kendo().Grid(item.InnerList)
.Name("Inner_" + item.ListID)
.Columns(columns =>
{
columns.Bound(o => o.ColD1).Title("ColD1").Width(110).HtmlAttributes(new { @class = "btn-link", @style = "cursor: pointer;" }).HtmlAttributes(new { @onclick = "UpdateItem('"+@item.ColD1+")" })
columns.Bound(o => o.ColD2).Title("ColD2").Width(110);
})
.DataSource(dataSource => dataSource.Server())
.Pageable()
.Sortable()
)
</text>
)
______________________________________________
1. In the detail template I tried add a link to column ColD1 as in column ColC with .Template but it didn't work.
So I used HtmlAttributes instead to simulate a link :
I added: @class = "btn-link", @style = "cursor: pointer;" and it worked.
Why can't I use the .Template in the inner grid?
2. When I click on the link I want to run a javascript function. I tried sending the inner item as parameter to the function (as I did successfully in the main grid with @item) but it didn't work.
I tried to send it in many ways:
1. @item.ColD1
2. o.ColD1
3.\\#= ColD1\\#
But none of the ways worked....
I'll be glad to receive your help,
Elad.
I want to do some checking and add some code before and after deleting the row in kendo grid. I don't want the default delete behaviour. In column, I add the custom field. It can link to javascript test function but cannot link to angularjs function. If I move that template to the html page, it can link to angularjs function.
columns: [ ...
{ field: "X", title:"", template: '<a ng-click="deleteSerial()" onclick="test()" class="k-button" style="width:15px">X</a>', width: "30px" }
],
What am I missing or any other better to do it?
Thanks.
Hi,
I need a kendo moal popup window with prev & next navigation. I just want to show editable form in the modal popup.
Please find attached file.
Thanks,
Lokesh
component.ts
import { Component, OnInit } from '@angular/core';
@Component({
moduleId: module.id,
selector: 'phx-overview',
templateUrl: 'overview.component.html'
})
export class OverviewComponent implements OnInit {
public status: any = {
isOpen: false
};
public data: [];
public compound: Array<string> = ["1", "2", "3", "4", "5", "6", "7", "8"];
public industry: Array<string> = ["1", "2", "3", "4", "5", "6", "7", "8"];
public technique: Array<string> = ["1", "2", "3", "4", "5", "6", "7", "8"];
public value = ['']
ngOnInit() {}
}
app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { Inject, NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule, Http, JsonpModule } from '@angular/http';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
// Import the Animations module
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
// KENDO UI
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
@NgModule({
imports: [
BrowserModule.withServerTransition({appId: 'a'}),
BrowserAnimationsModule,
FormsModule,
HttpModule,
JsonpModule,
AppRoutingModule,
// KENDO UI
DropDownsModule
],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule {}
Hi Team,
Do we have any control for session time out notification in kendo UI.
Can you share teh code snippnet which can do this task as mockup. where i set the session time out value in my web config based on that the notification should be shown up.
example:
When a webapage is kept opned for long time with out any event i need to display an message
with prompt do you want to continue your session if session keep the session log-in.
Thanks
Hello Kendo UI Team,
I have problem with spreadsheet. It adds underline style, changes font family and font size after second server-side import of the same server-side exported file.This issue is known almost for one year https://github.com/telerik/kendo-ui-core/issues/2143 but not fixed yet:(. So it there any possibility that it would be fixed in the nearest future? Is there any workaround for it?
By the way, is there any possibility to set the same width to multiple columns at the same time (like in MS Excel where it's possible to select multiple columns, start changing the with of one of them, but it will be applied to all selected ones)?
Is it possible to set width of the column in pixels via some dialog or something like this?
Thank you,
Artsem
Hi Team,
I wanted to shown an modal pop up message to user when the screen is inactive for 20 minutes.
if the user clicks yes his session will increase by 20 minutes again and continue.if clicked no he is moved to logout screen.I wanted to do this through kendoUI modal popup. any code snippet you share on this will be great to start off.
I have done this through Jquery library (jquery.idle-timer.js) but has lot off UI issues.
It will be great to start of if you have any code which can solve my issue here
Thanks Again!