kendo-ui

Displaying dynamic images in kendo grid

夙愿已清 提交于 2019-12-23 18:53:18
问题 I want to populate dynamic images in kendo grid. I am getting json data. And I have following code var grid = $("#timeSegmentGrid").kendoGrid({ //var icon=''; dataSource: { transport: { read: function (options) { getTimeSegmentList("", onSuccess, null); function onSuccess(responseData) { if (responseData.segments != null) options.success(responseData.segments); else options.success([]); } } }, pageSize: 5 }, pageable: { input: true, numeric: false, pageSizes: false, refresh: true }, toolbar:

Kendo grid resizable column width

六眼飞鱼酱① 提交于 2019-12-23 18:10:58
问题 The grid columns may be resizable. I want to store user-adjusted columns width and restore them when the next session starts. The best way to store columns width I've found is the following: var element = $('#grid').kendoGrid({ ... resizable: true, columnResize: function(e) { var state = {}; this.columns.every(function(c,i) { state[c.field] = c.width; return true; }); var state_txt = JSON.stringify(state); localStorage['profile_userprofile_grid_column_width'] = state_txt; } } Now I want to

How to use URLs like '/update/:id' as KendoUI datasource?

不想你离开。 提交于 2019-12-23 18:04:25
问题 I read the documentation but found nothing related to setting parameters in dataSource urls. Is it possible to achieve that? Thx in advance. 回答1: Yes, it is possible. The url s defined in the DataSource.transport might be a function. This function receives (for update ) as first argument the data being updated (the model) and returns the string that should be used as URL. Composing the URL for what you want to do is: var ds = new kendo.data.DataSource({ transport: { read: { url: function () {

How to prevent Kendo Panelbar from collapsing when I click button which is places on the panelbar itself

自古美人都是妖i 提交于 2019-12-23 17:36:15
问题 I have a button which is placed on Kendo Panelbar. I was writing a jQuery function so that when user clicks on the button panelbar does not collapse. Other logic that I put on is that there is no post-back when button is clicked. I can't get this to work. Help appreciated ! :) Here is the code snippet. $("#panelBarCarDetails").kendoPanelBar({ expandMode: "multiple" $('#btnTakeOwnership').click(function (e) { if (e.target) { e.preventDefault(); } }); 回答1: I managed to find a solution for your

Kendo UI jQuery Grid Server Side Filtering

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 16:44:55
问题 I am using Kendo UI for jQuery Grid to display some data. So far I am using Client Side Filtering and Paging where all the data records were returned in the initial call to the server (Web API and Dapper are being used at server side). However, the idea of getting all the data in a single call from the server is no more feasible as the Datasource has grown with time. I have enabled the option for server-side paging and filtering using the following: serverPaging: true, serverSorting: true,

Defining custom template for kendo ui grid column

ぐ巨炮叔叔 提交于 2019-12-23 16:43:20
问题 I have a kendo ui grid and I want to bind images. Here is my code: @model List<NewHope.Model.Mt4_prices_instant> <div class="tabContainer"> @(Html.Kendo().TabStrip() .Name("tabstripMarketWatch") .Items(tabstrip => { tabstrip.Add().Text("Market Rates") .Selected(true) .Content( @<text> @if (Model != null) { @(Html.Kendo().Grid(Model) .Name("Grid") .Columns(columns => { columns.Template( @<text> @if (item.direction == 1) { <img src="~/Images/up.png" alt="up"/> } else if (item.direction == 0) {

Kendo-Knockout: use knockout view model with kendo datasource

ぐ巨炮叔叔 提交于 2019-12-23 16:21:22
问题 I am doing some experiments with Kendo, Knockout and kendo-knockoutjs libraries. I want to use knockout view model with kendo datasource and to bind it to the kendo grid widget. In Kendo: html: <div id="main"> <div id="reportGrid" data-bind="source: gridDataSource"></div> </div> javascript: var billingReportViewModel = kendo.observable({ gridDataSource: new kendo.data.DataSource({data:[{name:"Apple", color:"green"},{name:"Banana", color:"yellow"}]}) }); $("#reportGrid").kendoGrid(); kendo

How to call a function when custom toolbar is clicked in Kendo UI?

牧云@^-^@ 提交于 2019-12-23 15:27:01
问题 I want to create a custom toolbar. Here is my code: toolbar:[{ text: "Go to Add User Page", className: "k-grid-custom", imageClass: "k-add" }], function createUser(){ alert('Hello World'); } I want to call the function named createUser when this button(custom toolbar) is clicked. How to make it possible? 回答1: You could add a unique class to the button and then use that class to bind to the click event. toolbar:[{ text: "Go to Add User Page", className: "myCustomClass", imageClass: "k-add" }],

MVC Kendo Grid not showing any data

余生长醉 提交于 2019-12-23 13:08:31
问题 I'm using the Kendo UI Grid server-side wrapper and attempt to load some data into it from my model. The grid is rendering on the page but no data is being populated. I haven't used this grid that much so I think I'm just missing something with the ClientTemplate. I've reviewed the Kendo docs but haven't had any luck yet. Here is my View: <div id="dependents"> <div id="grid"> @(Html.Kendo().Grid<Enrollment.Models.DependentModel>() .Name("grid") .DataSource(dataSource => dataSource .Ajax()

IE9 X-Frame-Options deny upload

蓝咒 提交于 2019-12-23 12:28:46
问题 I'm in a big trouble here. I got a .Net MVC 4 application that uses Kendo UI as layout base and for upload too. The upload works fine on all browsers except on an IE9 (9.0) running on a Windows Server 2008 RC2 x64 - I don't really know if those info are important . It gives me the error SCRIPT5: Access Denied when Kendo tries to send the async call. According to this post of a Telerik's Member in kendo UI Foruns, Kendo creates an iframe to make async uploads possible on prior versions to IE10