kendo-grid

Kendo Grid: Getting widget instance in Angular

喜夏-厌秋 提交于 2019-12-05 09:46:51
I was trying to get an instance of the Kendo grid within my Angular Controller, so I can try and hook up to some events (and call methods) I know this is probably not best practice (and should probably use a custom directive), but according to the documentation , we should be able to use... <div ng-app="app" ng-controller="MyCtrl"> <input kendo-datepicker="datePicker" k-on-change="onChange()"> </div> <script> angular.module("app", [ "kendo.directives" ]).controller("MyCtrl", function($scope) { $scope.onChange = function() { alert($scope.datePicker.value()); }; }); So, I was trying to do the

Kendo Grid filter to use combo box with column.values rather than drop down list

强颜欢笑 提交于 2019-12-05 08:41:51
I'm trying to get Kendo's Grid to show a filter using a combo box rather than a drop down list when used with values. What I mean is, on the grid columns array, each column can be given a list of values (objects with text and value properties) for each possible entry in the database, thereby rather than showing a code, it shows a recognisable name or text instead of the code. The problem is that whenever I specify values against the column, the filter reverts to a fixed list of criteria and a drop-down list, which I don't want. See an example of what I mean here . What I'd like to see is the

how to get the reference for checkbox element from both parent and child grids

左心房为你撑大大i 提交于 2019-12-05 08:17:06
I have got requirement like i need to find the parent grid row checkbox and if parent grid row checkbox is checked then i need to set all child grid checkboxes to true for that parent grid row checkbox for that purpose I have done like this.... <script type="text/javascript"> $(document).ready(function () { $('#btnMove').click(function () { var parentgrid = $('#GridParent').data('kendoGrid'); var childGrid = $('#GridParent').closest(".k-grid").data("kendoGrid"); var Count = $('#Gridparent').data("kendoGrid").dataSource.total(); alert(Count); for (i = 0; i < Count; i++) { var isChecked =

Give kendo datasource an angular scope variable

喜你入骨 提交于 2019-12-05 08:14:06
I'm currently trying to fill a kendo grid with remote data. Kendo has its own function to fetch the data, but I want to use the angular factory which I created. So I have a factory, which has a function "getSkills". This function obtains all the skill objects from my api. angular.module('MyApp').factory('Factory', function ($resource) { return $resource('/api/v1/skills/', { }, { getSkills: { method: 'GET', isArray: true } }); }); In my SkillController in angular, I put these fetched skills in a scope variable. $scope.skills = SkillFactory.getSkills(); I initialize the Kendo grid here: $scope

How to add Custom Button in each row in Kendo Grid

自作多情 提交于 2019-12-05 08:02:34
I am trying to add Custom Button to each row of Kendo Grid, but I am not getting the desired output.So my requirement is to add dynamic buttons to each row and on clicking on these button I need to process few thing for which I need few column values to be passed to that button click. I have tried something like @(Html.Kendo().Grid(Model) .Name("Grid") .Columns(columns => { columns.Bound(o => o.Id); columns.Bound(o => o.TBRId).Width(100).Title(UI_Resources.ListLabel_TBRId); columns.Bound(o => o.THUQuantity).Width(50).Title(UI_Resources.ListLabel_THUQuantity).HtmlAttributes(new { style = "text

kendo ui grid filter, sort and paging in the server

被刻印的时光 ゝ 提交于 2019-12-05 07:29:37
I'm using kendo grid and want to perform filtering, sorting and paging in the server. I understand that I should add to the dataSource: serverPaging: true, serverSorting: true But how do I tell the grid/dataSource which url it should use for the sortig, filtering etc. And what if I want to perform the sortig myself? I want to use the control kendo provides but to go to the server myself. Is there an event like "sortTriggered" where I can call "prevntDefault" or something like that... I don't know. Take a look at this sample. It is using the MobileServices javascript api for Windows Azure, but

How to set up popup position's anchor for element in kendo column template

大兔子大兔子 提交于 2019-12-05 07:13:14
I use kenod UI to create my Web UI. I have a column template like below var template = "<input id='details-button' type='image' src='images/detail_button.png' ng-click='showDetals(this.dataItem)'/>#: Contact #"; I want to popup a window every time I click the details button, and the popup's position should be at the bottom right of the button which I click. Here's what I do currently var popup = $("#detailsPopup"); popup.kendoPopup({ anchor: "#details-button", origin: "bottom right", }); But it doesn't work. Every time, the popup display at the bottom right of the button in the first row, not

How to make scrollbar auto enabled or disabled in a Kendo grid?

妖精的绣舞 提交于 2019-12-05 05:27:23
This is my code for creating the grid: @{ if (Model.GenericEntityList.Count > 0) { @(Html.Kendo().Grid(Model.GenericEntityList).Name(screenNames.ToString()).Columns( columns => { columns.Bound(a => a.ID).Title("<input id='checkAll' type='checkbox' />").ClientTemplate("<input type='checkbox' id=#=genericCheckbox(ID,ViewFlag)#").Width(7); columns.Bound(a => a.Name).Title(screen.ToString() + " Name").Width(93); } ).Selectable().Scrollable().DataSource( datasource => datasource.Ajax().Read(read => read.Action("CompSetHide", "Compset")) ).Events(a => a.Change("rowclick") ) .HtmlAttributes(new

Kendo ASP.NET MVC helper Grid generic class

本小妞迷上赌 提交于 2019-12-04 23:56:52
问题 I have the following dilemma: I am trying to make a Kendo UI Grid inside a partial View that will be used with different types of objects and that can support actions such as Delete or Create. The object looks like this: public class GridViewModel { public Type ObjectType { get; set; } public IEnumerable<object> Items { get; set; } public GridViewModel(Type type, IEnumerable<object> items) { Items = items; ObjectType = type; } } ObjectType is a variable of type Type that retains the type of a

Kendo UI reference not working in Razor view

半腔热情 提交于 2019-12-04 23:55:16
I am trying to create a Telerik Grid view but when I go to reference kendo it does not recognize it. Visual Studio is giving me an error when I try to reference kendo. This is the code @(Html.Kendo().Grid) and below is the error. 'System.Web.Mvc.HtmlHelper<dynamic>' does not contain a definition for 'Kendo' and no extension method 'Kendo' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<dynamic>' could be found (are you missing a using directive or an assembly reference?) I have added a bundle in the BundleConfig file for both Scripts and Content. Also I have added @Scripts.Render