In the custom themebuilder, what configuration items do I change to modify the grid header colors and font?
If I were to override the CSS myself, which items would I need to change?
Specifically, I want to use the bootstrap theme, but change the grid header background color to blue (typical bootstrap blue) and the text to white.
Thanks,
--Ed
I need exactly similar grid to this : http://demos.telerik.com/kendo-ui/grid/editing-custom
I am working on a grid with combobox for edit. i have a functionality to add row on button click. On button click i get data from database and add to grid like below. Edit combo box template does not work from the second row. When user adds the first row, combo box works, but from the second row edit templates does not work.
function AddNewROwToGrid()
{
var grid = $("#MyGrid").data("kendoGrid");
var datasource = grid.dataSource;
$.ajax({
type: 'GET',
contentType: 'application/json',
url: MYURL,
success: function (resultData) {
if (resultData.length > 0) {
var gridExistingData = datasource.data();
var mergedData = $.merge(gridExistingData, resultData);
datasource.data(resultData);
}
}
});
}
Below is the configuration of Grid.
editable: true,
{
field: "MyField", title: "New Field", width: "180px", template: "#=MyField#",
editor: function(container, options) {
$('<input data-text-field="MyField" data-value-field="MyField" data-bind="value:' + options.field + '"/>').appendTo(container).kendoComboBox({
dataSource: {
data: autoFillData
},
dataValueField: "MyField",
dataTextField: "MyField",
autobind: true
});
}
},
Please help. it is urgent
Is there a way to display other datasource fields in a custom groupTemplate?
If i use the below code, i get a undefined error.
groupTemplate: "#: data.aDifferentField#"The reason i want to do this is because i want to have grouped options in my select list but grouping the data source by the real field doesn't return the order i want.
So i basically use a different field to group the data source and want to display the name of my original grouping field instead.
Hi guys, in the latest Kendo UI release (2016.3.914) some of the k-icons were resized and the k-i-pdf icon now looks like it has been cut down / doesn't fit.
Latest update: http://demos.telerik.com/kendo-ui/styling/icons
Older version when it was still looking good: https://web.archive.org/web/20160317171312/http://demos.telerik.com/kendo-ui/styling/icons
I don't think this is intended so I thought I'd let you know, just in case this hasn't been reported already.
Hi All,
Im trying to pass parameter from combo box to action class. below is my cascading combo box. how can i get value of first combo box to action class to get list values to second combo box. i have created companyId(Long) setter and getter in action class but its always coming as value 1. please help me how to pass the value of first combo box to action class. below is my snipet.
<kendo:comboBox name="companyId" filter="contains" placeholder="Select company..." style="width: 50%;" suggest="true" dataTextField="unitName" dataValueField="id">
<kendo:dataSource data="${organizationUnitsList}"></kendo:dataSource>
</kendo:comboBox>
<label for="payGpName">Pay Group Name:</label>
<kendo:comboBox name="payGpName" filter="contains" placeholder="Select company..." style="width: 50%;" suggest="true" autoBind="false" cascadeFrom="companyId" dataTextField="payGpName" dataValueField="id">
<kendo:dataSource serverFiltering="false">
<kendo:dataSource-transport>
<kendo:dataSource-transport-read url="/reports/misreports/loadPayGroup" type="POST" contentType="application/json"/>
<kendo:dataSource-transport-parameterMap>
<script>
function parameterMap(options,type) {
return JSON.stringify(options);
}
</script>
</kendo:dataSource-transport-parameterMap>
</kendo:dataSource-transport>
</kendo:dataSource>
</kendo:comboBox>
I am trying to display a simple grid using data from MVCMusicStore controller action, but don't seem to get any results.
What am I doing wrong ?
The relevant page follows. The relevant project could not be attached due to size.
<div id="grid"></div>
<script>
$(function () {
$("#grid").kendoGrid({
height: 400,
columns: [
"Title",
{ field: "Price", format: "{0:c}", width: "150px" },
{ field: "AlbumArtUrl", width: "150px" },
{ command: "destroy", title: "Delete", width: "110px" }
],
editable: true, // enable editing
pageable: true,
sortable: true,
filterable: true,
dataSource: {
serverPaging: true,
serverFiltering: true,
serverSorting: true,
pageSize: 10,
schema: {
data: "Data",
total: "Total",
model: { // define the model of the data source. Required for validation and property types.
id: "AlbumID",
fields: {
AlbumID: { editable: false, nullable: true },
Title: { validation: { required: true } },
Price: { type: "number", validation: { required: true, min: 1 } },
AlbumArtUrl: { validation: { required: false } }
}
}
},
batch: true, // enable batch editing - changes will be saved when the user clicks the "Save changes" button
transport: {
read: {
url: "@Url.Action("Index", "StoreManager")", //specify the URL which should return the records.
contentType: "application/json",
dataType: "json",
type: "POST" //use HTTP POST request as by default GET is not allowed by ASP.NET MVC
},
parameterMap: function(data, operation) {
if (operation != "read") {
// post the products so the ASP.NET DefaultModelBinder will understand them:
// products[0].Name="name"
// products[0].ProductID =1
// products[1].Name="name"
// products[1].ProductID =1
var result = {};
for (var i = 0; i < data.models.length; i++) {
var album = data.models[i];
for (var member in product) {
result["albums[" + i + "]." + member] = album[member];
}
}
return result;
} else {
return JSON.stringify(data)
}
}
}
}
});
});
</script>
I have a problem grouping the schedule. In the sample http://demos.telerik.com/kendo-ui/scheduler/resources-grouping-horizontal it shows how to achieve this, but if I replace the datasource with an array, it doesn't work anymore. As soon as I remove the grouping attribute the events show up in the scheduler.
You can find the repro in this dojo: http://dojo.telerik.com/UCUle/7. This has two scheduler controls, which are exact copies of each other, only the group is different.
What am I doing wrong?
I have an Ajax bound grid with a simple textbox in the editor template. This works fine with simple value binding.
<input ... data-bind="value:valueproperty" ... />Now I want to add attribute binding as described here: http://docs.telerik.com/kendo-ui/framework/mvvm/bindings/attr
<input ... data-bind="attr:{data-someproperty:someproperty},value:valueproperty" ... />The template no longer works. It does not even show the value anymore so it looks like the binding fails.
I also tried some variations like:
<input ... data-bind="value:valueproperty, attr:{ 'data-someproperty':someproperty }" ... />Is this supposed to work at all?
Ok, Ive been going through the different demos/examples such as this one. Ive got the demo source code and using it to compare with what im doing.
http://demos.telerik.com/aspnet-mvc/grid/editing-custom
We have an existing application that a specific column in question is using an EditorTemplate that defines a dropdownlist and it works fine. However, it loads a list of items beforehand, so that when the grid renders, the list is available. This list is independent of the data for the rows or the viewmodel. Thats fine, but I need to load the dropdownlist after the grid and view have rendered and the user has provided some input via other controls. Using this input, rows are added to the grid - or rather rows are added to the underlying data, then the grid datasource is reloaded. So then this new row needs to have the column with the dropdown, be specific to the inputs the user has made. Each row will have the same dropdownlist for that column, but I cant know what the list will contain UNTIL after the grid and view have rendered and the user has provided input.
Imagine a customer order and its associated items. The user will have to provide some additional input before they can start adding items to the order. The sequence kinda goes like this:
- User chooses a few selections about the order, CustomerAccount, Shipper, etc...then they hit a button that creates the order
- Then the user starts adding items to the order (which render in the grid)
- The items in the grid include a column with the dropdownlist. Its this list that is dependent upon other data the user has provided and cant be known ahead of time.
The template approach seems to be fine - assuming you know what the list for the dropdown will be beforehand, but not if it must be determined AFTER the grid is rendered. So Im looking at these ideas, any suggestion would be appreciated:
(1) Use a datasource for the column with the dropdownlist, then when the user creates the order, now I can determine what the dropdownlist should contain, and it will be the same for each order item in the grid. I would need to update the column datasource somehow and have it refreshed.
(2) Continue to use the EditorTemplate, but each time I add an item to the grid, include a collection of items in the viewmodel, which I use to filter the list in the EditorTemplate
Suggestions?
I have an angularjs component that receives a json object as its input from another angular component. The ListView is initialized with the json object that is initially set as the input. However, when I change the json object from the main component, the data shown does not change even though the object itself has changed.
Below is my component code:
(function () { 'use strict'; var app = angular.module('myModule'); function myGroupCtrl() { var vm = this; vm.sortableOptions = { filter: '.k-listview div.group' }; vm.listOptions = { dataSource: new kendo.data.DataSource({ data: vm.groups }) }; vm.$onChanges = function (changes) { console.log(vm.groups); // new data console.log(vm.listOptions.dataSource.data()); // original data } } app.component('myGroupComponent', { controller: [ myGroupCtrl ], controllerAs: 'vm', templateUrl: 'app/myGroups.html', pageable: true, transclude: true, bindings: { groups: '<' } });})();
<kendo-sortable options="vm.sortableOptions"> <kendo-list-view id="groups" options="vm.listOptions"> <div class="group" k-template> <span class="h4"> {{dataItem.groupName}} </span> </div> </kendo-list-view></kendo-sortable>I thought there might be a way to rebind or refresh the dataSource, but everything that I have tried gives me an error. I have used k-rebind on the grid. Is there something similar for ListView? Thanks!