Is there a way to show formatting, basically the way it shows when there is value 0 inside.
In this example, it does not show any formatting, before entering value.
I want it look like 0.00kg on load.
https://dojo.telerik.com/oWObuGuP
I have used Kendo Dropdownlist , to display information in list. Here my requirement is to add the bellow mention styles i.e. (.k-list-container and .k-list-scroller ) to Dropdownlist using JavaScript.
And make the height of ".k-list-scroller" dynamic i.e. the drop down list-area when selected, the height of it, should go beyond screen height or window height. In this case i have hard coded (height: 500px !important;).
.k-list-container{
width: auto !important;
height: auto !important;
}
.k-list-scroller{
height: 500px !important;
overflow-y: scroll !important;
}
The bellow code example is for reference -
<
style
>
.k-list
{
white-space: nowrap;
}
.k-list-container{
width: auto !important;
height: auto !important;
}
.k-list-scroller{
height: 500px !important;
overflow-y: scroll !important;
}
</
style
>
<
div
id
=
"example"
>
<
p
>
data: <
select
id
=
"local"
></
select
>
</
p
>
</
div
>
<
script
>
$(function() {
var data = [
{ text: "Grey Grey Grey Grey Grey Grey Grey Grey Grey Grey Grey Grey Grey Grey Grey Grey Grey ", value: "13" },
{ text: "Black 1", value: "1" },
{ text: "Orange 2", value: "2" },
{ text: "Black 3", value: "3" },
{ text: "Orange 4", value: "4" },
{ text: "Black 5", value: "5" },
{ text: "Orange 6", value: "6" },
{ text: "Black 7", value: "7" },
{ text: "Orange 8", value: "8" },
{ text: "Black 9", value: "9" },
{ text: "Orange 10", value: "10" },
{ text: "Black 11", value: "11" },
{ text: "Orange 12", value: "12" },
{ text: "Black 1", value: "1" },
{ text: "Orange 2", value: "2" },
{ text: "Black 3", value: "3" },
{ text: "Orange 4", value: "4" },
{ text: "Black 5", value: "5" },
{ text: "Orange 6", value: "6" },
{ text: "Black 7", value: "7" },
{ text: "Orange 8", value: "8" },
{ text: "Black 9", value: "9" },
{ text: "Orange 10", value: "10" },
{ text: "Black 11", value: "11" },
{ text: "Orange 12", value: "12" },
{ text: "Grey Grey Grey Grey Grey Grey Grey Grey Grey Grey Grey Grey Grey Grey Grey Grey Grey ", value: "13" },
{ text: "Black 1", value: "1" },
{ text: "Orange 2", value: "2" },
{ text: "Black 3", value: "3" },
{ text: "Orange 4", value: "4" },
{ text: "Black 5", value: "5" },
{ text: "Orange 6", value: "6" },
{ text: "Black 7", value: "7" },
{ text: "Orange 8", value: "8" },
{ text: "Black 9", value: "9" },
{ text: "Orange 10", value: "10" },
{ text: "Black 11", value: "11" },
{ text: "Orange 12", value: "12" },
{ text: "Black 1", value: "1" },
{ text: "Orange 2", value: "2" },
{ text: "Black 3", value: "3" },
{ text: "Orange 4", value: "4" },
{ text: "Black 5", value: "5" },
{ text: "Orange 6", value: "6" },
{ text: "Black 7", value: "7" },
{ text: "Orange 8", value: "8" },
{ text: "Black 9", value: "9" },
{ text: "Orange 10", value: "10" },
{ text: "Black 11", value: "11" },
{ text: "Orange 12", value: "12" }
];
$("#local").kendoDropDownList({
dataTextField: "text",
dataValueField: "value",
dataSource: data,
});
});
</
script
>
</
body
>
</
html
>
Thanks
Hi there
In this example:
$("#employeeGridDiv").kendoGrid({
dataSource: {
type: "odata",
transport: {
read: {
type: 'GET',
contentType: "application/json; charset=utf-8",
dataType: "json",
url: '@Url.Action("LoadEmployeeGrid", "EmployeePanel")'
}
},
pageSize: 20
},
groupable: true,
sortable: true,
pageable: {
refresh: true,
pageSizes: true,
buttonCount: 5
},
columns: {
type: 'GET',
contentType: "text/html",
url: '@Url.Action("LoadEmployeeGridColumns", "EmployeePanel")'
}
});
I'm trying to populate the columns from the controller method LoadEmployeeGridColumns which returns the JSON representation of the following:
public class GridCellClass
{
public string field { get; set; }
public string title { get; set; }
public string template { get; set; }
public int width { get; set; }
public bool visible { get; set; }
public string format { get; set; }
public string attributes { get; set; }
}
It does not work. How exactly should the "columns" portion be implemented?
Thanks.
I have a grid which has two columns ,when i click on the first column content i want it to show me a message box,but the problem is when i click on the message box,it does not go away compeltly,the nmessage box shadow is still there ,what im doing is:
$("#gridProAvail").kendoTooltip({
filter: "td",
content: toolTip,
width: 400,
height: 100,
position: "top"
});
$("#gridProAvail").click(toolTip);
function toolTip(e) {
var target = $(e.target);
if(e.target[0].cellIndex == 0) {
var cellInfo = e.target[0].innerHTML;
alert(cellInfo);
grid.dataSource.read();
}
i need the content to be shown in the tool tip
I've bound data sources to grids and dropdownlist widgets but I haven't seen many examples or binding the data in a datasource to simple multiple labels or textboxes on a page load (in MVVM preferably). I can bind it to a simple variable defined in the observable objects but how can I bind it to a datasource value like an array of objects?
<script id="index" type="text/x-kendo-template">
<span data-bind="text: someTextValue"></span>
<span data-bind="text: someTextValue2"></span>
</script>
var viewModelIndex = kendo.observable({
someTextValue: '12345',
someTextValue2: '12345',
fruits: new kendo.data.DataSource({
data: [
{ id: 1, name: "Apples" },
{ id: 2, name: "Oranges" },
{ id: 3, name: "Bananas" }
],
schema: {
model: {
fields: {
id: { type: "number" },
name: { type: "string" }
}
}
}
}),
});
.
I am trying to use numeric textbox inside treeview template. When I try to focus the textbox, it doesn't focuses and lost the focus. Since I wasn't able to change the values. I tried using mvvm binding from html and its not working either.
P.S I had to use numerictextbox because of the formatting reasons. Below is the sample url i have tried,
https://dojo.telerik.com/@paulrajj/OmOdilij/2
Kindly let me know if there is any solutions to fix this.
I manage to make anything work with the , where ever I try to use one, grid or .
my code is:
thanks for the assistance
var customersData = new kendo.data.DataSource({
dataSource: {
type: "odata",
transport: {
read: {
url: SCH.webapp_api + '/scheduler/customers/data',
dataType: "json",
type: "GET",
cache: false,
},
schema: {
model: {
fields: {
id: { type: "number" },
name: { type: "string" },
company: { type: "string" },
}
}
}
},
autoSync: true,
serverFiltering: true,
}
});
$("#customers").kendoDropDownList({
optionLabel: "Choose a customer",
filter: "contains",
dataTextField: "name",
dataValueField: "id",
dataSource: customersData,
index: 0
});
Is it possible to initialize a grid from an table with hierarchy inside?
thanks
Hi.
What is the preferred way of hiding/showing kendo controls in Angular? There are some options:
- ng-show
- ng-if
- k-visible
Beside the obvious difference between the first two, what are the complications of hiding/removing a wrapper DOM element as opposed to using k-visible. Are there any differences in performance, memory usage, etc. to be aware of?
Cheers,
JH
Hi,
I'm using Node.js configured with DataSource. All was working fine. We switched from mysql to Postgres and now the Grids don't populate with the returned data. Before pasting tons of code here, checking if I missed something obvious:
I added the following change event function to the transport, and in the Chrome debugger I see the expected rows are returned in the results. What I don't know if the data object stores the rows in some new or unexpected way. There's an element called "0" with child array called "rows" which has the correct number of rows, populated with the correct data and elements named correctly. I also checked the element names throughout and they match.
Any tips on how to debug whether the grid is receiving the update?
change: function(e) {
var data = this.data();
console.log(data);
}