kendo-grid

Conditionals embedded in client templates in kendo ui MVC grid (server)

依然范特西╮ 提交于 2019-12-24 00:35:37
问题 Inside a Kendo Grid, I'd like to display a link to the user if manager is not assigned , else display the name of manager already assigned . as the manager can be null, I'm having success getting this link to only show when the manager is not null. but problem is if manager is not null how to diaplay the manager name in else part Below is the client template I'm trying to use: @(Html.Kendo().Grid(Model) .Name("Grid") .Columns(columns => { columns.Bound(o => o.AccountManager).Title("Account

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:

How to setup CURD with KendoUI grid for use with Kendo-Angular and an Angular OData factory?

故事扮演 提交于 2019-12-23 18:16:48
问题 In a previous project, where I was not using Angular, I setup a Kendo.DataSource that used an OData endpoint as follows: var userDS = new kendo.data.DataSource({ type: "odata", transport: { read: { url: "/api/Users?$filter=USERGROUPS/any(usergroup: usergroup/ID eq '" + groupData.ID + "')", // only need to expand users for the selected group dataType: "json", // the default result type is JSONP, but WebAPI does not support JSONP }, update: { url: function (data) { // TODO: write UpdateEntity

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

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) {

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()

Kendo Grid Column Width + Scrollable

假如想象 提交于 2019-12-23 11:37:12
问题 I'm trying to bind to a scrollable kendo grid from javascript and having a few issues with column widths. This fiddle demonstrates the issue (code at the end of the question). I'm specifying the headers in the html and adding a width to one of the headers. The javascript then sets the dataSource (in production code this is done via an ajax call). I want to avoid having to set the columns.width property in the javascript because I have many grids that, since my viewmodels are carefully

Kendo Grid Automatically changing Timezone

≡放荡痞女 提交于 2019-12-23 09:26:12
问题 On my Kendo Grid I recieve date time from server. On the client end, this time is changed to client's timezone and that is displayed. How can I show the same time from the server to the client. the following is my kendo code for binding the datetime. columns.Bound(p => p.CreateDate).Format("{0:dd/MM/yyyy hh:mm:ss}").Sortable(true).Width(180); 回答1: Since the dates are created on the client when the response from the server is returned - the dates are always created with an offset according to

In a kendo grid, can I set column attributes dynamically with a function?

天涯浪子 提交于 2019-12-23 08:58:48
问题 I've got some code here where I am trying to set a background color of a cell based on the value of the data item: http://dojo.telerik.com/@solidus-flux/eHaMu <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Kendo UI Snippet</title> <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.common.min.css"> <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.rtl.min.css"> <link rel="stylesheet" href="http://cdn.kendostatic.com/2014