kendo-ui

Kendo Grid Hiding/Showing Delete button

百般思念 提交于 2019-12-19 07:48:10
问题 I am new on Kendo MVC components as well as on jQuery. I am building Kendo Grid.I would like to hide destroy(delete) command on page load on Kendo grid.After that when I click to button on same page, it should be visible. kendo grid: @(Html.Kendo().Grid<Model>() .Name("grid") .Columns(columns => { columns.Bound(product => product.DESCRIPTION).Title("Description"); columns.Bound(product => product.CODE).Title("Description"); columns.Command(commands => { commands.Destroy().HtmlAttributes(new {

Kendo UI grid - different templates for Edit and Create

为君一笑 提交于 2019-12-19 03:21:41
问题 We are using Kendo UI grid to display some records. The requirements need us to have a column (Say "File Name")shown as a text box when the user clicks on "Edit". However, when user clicks on the "Create" button in the toolbar, the same column should be replaced with a File Select control which will allow the user to select a file from his machine. The other columns remain the same. I have already tried searching through Stack Overflow as well as the Kendo UI Grid forums, but to no avail. Is

kendoui validation tooltip in custom popup editor not positioning correctly

梦想与她 提交于 2019-12-18 19:35:09
问题 Please see jsfiddle for example, blank out First Name field to have validation tooltip show. In a normal form the validation tooltip positions correctly to the right of each element. But in the popup editor for the grid it still trying to position the tooltip below the element as if it where editing inline. I have tried <span class="k-invalid-msg" data-for="FirstName"></span> but it doesn't change anything. Is there a setting I am missing to get this working in popupeditor? I guess I could

Line break in category label of kendo-ui chart

不羁的心 提交于 2019-12-18 19:31:14
问题 I have a chart where the labels contain two parts, a name an a number. I want the number to appear below the name, illustrated by the <br/> tag: I load the contents of the chart, and set the label in my controller: When i try to use a template on the label, the text after the line break appears at the bottom of the chart along with the rest of the text of the chart: javascript code: $("#chart1").kendoChart({ theme: "BlueOpal", title: { text: "My reported hours" }, legend: { position: "bottom"

How can I refresh value kendo numerictextbox?

为君一笑 提交于 2019-12-18 19:04:06
问题 I have a kendoNumericTextBox. I have code that sets the value of the input element associated with the kendoNumericTextBox. For example, the code calls: $('#myId').val('test'); Unfortunately, the kendo numeric text box doesn't automatically reflect the value. How can I tell the kendoNumericTextBox to update its value? I know there's a method on kendoNumericTextBox as follows: $('#myId').data('kendoNumericTextBox').value('test'); However, I'm populating many fields and not exactly sure which

Exporting all data from Kendo Grid datasource

谁说胖子不能爱 提交于 2019-12-18 13:35:16
问题 I followed that tutorial about exporting Kendo Grid Data : http://www.kendoui.com/blogs/teamblog/posts/13-03-12/exporting_the_kendo_ui_grid_data_to_excel.aspx Now I´m trying to export all data (not only the showed page) ... How can I do that? I tried change the pagezise before get the data: grid.dataSource.pageSize(grid.dataSource.total()); But with that my actual grid refresh with new pageSize. Is that a way to query kendo datasource without refresh the grid? Thanks 回答1: A better solution is

How to change Kendo UI grid page index programmatically?

旧街凉风 提交于 2019-12-18 12:45:51
问题 I have a kendo ui grid. Let's say that the JS variable pointing to the grid is called grid . How can I go to page 3 programmatically? Thanks. 回答1: You might to use: grid.dataSource.query({ page: 3, pageSize: 20 }); Documentation in here. or: grid.dataSource.page(3); Documentation in here 回答2: Answer is just set it pate: 1 when datasource created var dataSource = new kendo.data.DataSource({ data: [ { name: "Tea", category: "Beverages" }, { name: "Coffee", category: "Beverages" }, { name: "Ham"

Kendo + Angular chart data

僤鯓⒐⒋嵵緔 提交于 2019-12-18 12:45:21
问题 I'm trying out Kendo charts with angular, and I have problem displaying data, here is my code: HTML: <div kendo-chart="rchart" data-k-options="chartOptions" data-role="chart" class="k-chart" style="position: relative;"></div> Javascript: resultService.getResult().then(function (resultResponse) { $scope.data = resultResponse.data; $scope.oldReps = _.pluck($scope.data.TreningScores.Item1, 'Item2'); $scope.newReps = _.pluck($scope.data.TreningScores.Item2, 'Item2'); $scope.categories = _.pluck(

Kendogrid destroy() and recreate the table on a new datasource, why do the old table columns still exist?

别来无恙 提交于 2019-12-18 11:48:18
问题 When invoking destroy() in KendoUI Grid and then recreate the table on a new DataSource : why do the old table columns still exist? The only element here that stays the say is the element. How do I tell the grid to read the new datasource columns (it reads everything else correct). (if I make 2 different elements, they both populate properly but I rather just keep 1 element and replace the elements table by destroy and reinit) 回答1: Most probably this is because you are not clearing the

Javascript - How to add objects to column array in kendo ui grid dynamically?

只愿长相守 提交于 2019-12-18 09:32:16
问题 I am trying to generate objects in the columns array as the heading implies, although I haven't found a working method. alert( "Value 1: " + temporaryArray[1] + " - " + finalArray[1].values ); alert( "Value 2: " + temporaryArray[2] + " - " + finalArray[2].values ); var myGrid = $("#grid").kendoGrid( { columns: [ { title: temporaryArray[0] + " ", field: gridArray[0].values + " " } ], dataSource: { data:finalArray, pageSize:10 }, scrollable:false, pageable:true }); I've tried the following to