kendo-grid

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

Adding bindeable checkbox column to grid

自作多情 提交于 2019-12-17 17:40:13
问题 Have this column in a Kendo grid that currently display a MySQL Boolean value so we have either 1 or 0. Made this demo to play on... This in an autosync and inline:true grid. I would like this column to be of type "Checkbox" but, for some weird reasons, i just cannot find a demo or an example on the web that displays "enabled" checkbox that changes 1 to 0 when unchecked and Vice-Versa. 回答1: There are some previous considerations: When you click in a cell for editing you are switching it to

Kendo UI Grid Inserts/Updates create Duplicate Records (again)

纵然是瞬间 提交于 2019-12-14 04:25:55
问题 I have same problem as Daniel had in this topic, but his solution doesn't work for me: http://www.kendoui.com/forums/ui/grid/kendo-ui-grid-inserts-updates-create-duplicate-records.aspx#-jhxqRrNAUGsTFJaC-Ojwg So use-case. Users adds 2 new records one after another: Presses "Add new record" button of a grid Fills the fields (name="Alex", amount=10, comment="first"). Record one is ready. Press 'Save'. (data goes to controller and than to Database) User see one record in a grid Press "Add new

Specifying default sort in grid

白昼怎懂夜的黑 提交于 2019-12-14 03:52:33
问题 Is it possible to specify a default sort when using the knockout-kendo binding to bind the Telerik Kendo grid? I am binding the grid like this: kendoGrid: { data: grid.Rows, sortable: {allowUnsort: false,mode:'single'}, columns: grid.Columns} However, I have not found a way to specify the default sort. Standard Kendo has a sort:{field:"Col1",dir:"asc"} element that can be specified on the data source, but it's unclear how this can be applied to the kendoGrid binding Default Kendo sort element

Kendo AutoComplete Not Displaying

元气小坏坏 提交于 2019-12-14 03:51:34
问题 I have a custom editor that I use with autocomplete. The web service is getting called and returning the data. However, nothing is diaplying in the editor. I put a breakpoint in schema.parse() but it's never hit. What am I missing? function myAutoCompleteEditor(container, options) { $('<input data-text-field="Name" data-value-field="Name" data-bind="value:' + options.field + '"/>') .appendTo(container) .kendoAutoComplete({ autoBind: false, suggest: true, delay: 500, dataSource: new kendo.data

Cannot open the edit popup of kendo grid using jquery

本秂侑毒 提交于 2019-12-14 03:45:32
问题 I am implementing a context menu for my kendo grid on MVC page. I am trying to call the edit button on my kendo grid using on click of the context menu. I have implemented event on my context menu and on the event written jquery code to call fire the click event of the edit button. I do see the window popping up for a split second and closing. How do I get this working @(Html.Kendo().ContextMenu() .Name("menu") .Target("#GridTeam") .Filter("tr") .Orientation(ContextMenuOrientation.Vertical)

Kendo UI Grid with dynamic columns and random data showing JSON objects as [object Object]

寵の児 提交于 2019-12-14 02:27:05
问题 The data is random and I cant predict the columns. I read data from remote and display it on the grid. I get json objects as [object Object] in Kendo UI Grid, How can i visualize it or is there any way to show a detail view of a cell in a Kendo grid ? I think it would solve the issue if I can insert a treeview of JSON Object in those cells. 回答1: The problem is that your Address is a complex object, so you need to tell kendoGrid how to display it. For example, I have a complex object Connected

Error in Kendo Grid Export to excel “cannot read property 'length' of undefined” in jQuery.js file

亡梦爱人 提交于 2019-12-14 02:12:11
问题 I am trying to export kendo grid to excel, Then I am having error in console. Please help me if anyone knows about it.Thanks in Advance. angular.js:13920 TypeError: Cannot read property 'length' of undefined at Function.map (http://lm.stage.cargoclix.net/bower_components/jquery/dist/jquery.js:461:18) at init.toDataURL (http://lm.stage.cargoclix.net/bower_components/kendo-ui/js/kendo.all.min.js:30:19702) at init.<anonymous> (http://lm.stage.cargoclix.net/bower_components/kendo-ui/js/kendo.all

Hide an element conditionally by its value

不想你离开。 提交于 2019-12-13 23:35:23
问题 I have a kendo grid containing following columns. 1.Name 2.Age 3.Type{values:public,private} I need to hide a column in specific row. In my problem, i want to hide age cell if Type value is private. 回答1: using if else format columns.Template(@<text></text>) .ClientTemplate("#if (field == value) {#" + "<a></a>" + "#}else {#" +"<input name='chkSubscribed' class='subscribedClass'type='type': '' #/>" + "#} #").Width(130).Title("title"); 回答2: You can't hide the cell but you can hide the age