Hi - we use MVVM binding al lot in our kendo application.
Are there any samples / help pages that list the attribute names to use when declaring a TileLayout in MVVM style ?
Something similar to the information presented on this page: https://demos.telerik.com/kendo-ui/mvvm/widgets
Regards
Tom
I have this code below
$("#numeric").kendoNumericTextBox({
min: 1,
max: 100,
decimals: 0,
format: "# pieces",
spinners: true,
restrictDecimals: true
});
My problem is that if user enter "0", then tab out, value changes to "1" only, not "1 pieces"
So it does not follow the format if the entered value is below the min. No problem if value is more than max.
My version is "2018.3.1017", upgrade is not an option.
Do you have a workaround on how to force to change the display value with format (may be on the onblur event perhaps)?
@{Html.Telerik().Grid(Model)
.Name("grdAllUsers")
.DataKeys(keys => keys.Add(k =>
k.Id)
)
.Columns(columns =>
{
columns.Bound(o => o.FirstName)
.Width(150);
columns.Bound(o => o.LastName)
.Width(150);
columns.Bound(o => o.EmailAddress)
.Width(200);
.Width(70)
.HtmlAttributes(new { style = "text-align:center" });
})
.NoRecordsTemplate(@<
text
>No User records to display.</
text
>)
.Pageable(paging =>
paging.PageSize(15)
)
.Sortable()
.Filterable()
.Render();
}
@{Html.Kendo().Grid(Model)
.Name("grdAllUsers")
.Columns(columns =>
{
columns.Bound(o => o.FirstName)
.Width(150);
columns.Bound(o => o.LastName)
.Width(150);
columns.Bound(o => o.EmailAddress)
.Width(200);
.Width(70)
.HtmlAttributes(new { style = "text-align:center" });
})
.Pageable(paging =>
paging.PageSize(15)
)
.Sortable()
.Filterable()
.Render();
}
Hello,
we have a TileLayout with a Pie Chart inside. The Pie Chart is diaplaying labels.
Unfortunately when the tile size is reduced, the labels are cut off (horizontally and vertically).
Is there any way to prevent this.
Example:
Reduce the width of the Pie Chart in this dojo: https://dojo.telerik.com/EsOWoqAL
Hi,
i have a drop down tree created, as shown in the attachment below
i need to checked all the checkboxes by default. How to do this?
Hi!
I'm trying to make an ajax call to my controller function.
To get all the data that currently are in a grid's datasource.
Instead of calling directly to the grid's datasource.data() which only returns me the current grid page.
I go about this by instantiating a new kendo datasource.
But everything i try, yields "Uncaught TypeError: e.slice is not a function"
Thanks in advance.
public
JsonResult ReadTimeRegistrationAjax([DataSourceRequest] DataSourceRequest request)
{
var dataSourceResult = getStuff().ToList();
return
Json(dataSourceResult.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
}
var
grid = $(
"#GridTimeRegistrations"
).data(
"kendoGrid"
);
var
dataurl = grid.dataSource.transport.options.read.url;
var
dataSource =
new
kendo.data.DataSource({
transport: {
read: {
url: dataurl,
dataType:
'json'
}
},
});
dataSource.fetch(
function
() {
var
data = dataSource.data();
console.log(data);
}
I have an issue and I need someone to see what I'm doing wrong...
I tried to use several times "reorder". I simplify the test to this :
<!-- container templates -->
<
script
id
=
"barcelona"
type
=
"text/x-kendo-template"
>
A
</
script
>
<
script
id
=
"sofia"
type
=
"text/x-kendo-template"
>
B
</
script
>
$("#home-super-container").kendoTileLayout({
containers: [{
colSpan: 1,
rowSpan: 1,
header: {
text: "Barcelona"
},
bodyTemplate: kendo.template($("#barcelona").html())
}, {
colSpan: 1,
rowSpan: 1,
header: {
text: "Sofia"
},
bodyTemplate: kendo.template($("#sofia").html())
}],
columns: 2,
columnsWidth: 285,
rowsHeight: 285,
reorderable: true,
reorder: function (e) {
console.log(e.newIndex, e.oldIndex);
}
});
The console.log indicates (0 0), it should be (0 1) or (1 0)...
Hi,
I have a kendo toolbar with multiple dropdowns and checkboxes to filter my datasource. What I want is when I submit my filter selections, if a spesific checkbox is checked, then datetime column of the grid will have this template:
"#= kendo.toString(kendo.parseDate(dates), 'dd/MM/yyyy') #"
If the checkbox not checked (or the page is just loaded with empty checkbox in default scenario) the column will have:
"#= kendo.toString(kendo.parseDate(dates), 'dd/MM/yyyy HH:mm') #"
as template.
I tried conditioning inside of grid but I didn't manage to obtain checkbox value. I tried writing a function outside the grid function but when I refresh grid data with:
var grid = $("#grid").data("kendoGrid");
grid.dataSource.data(reportData);
it only refresh the data inside grid, that does not trigger the template function.
How can I change the column template while refreshing the data according to that checkboxs value?
Greets Umutcan
I was having some issues with a grid where I was getting an error saying that Description is not field that can be called on a null value, or something along those lines. TimeType is of type TimeTypeViewModel.
public class TimeTypeViewModel
{
public override string ID { get; set; }
public override string Description { get; set; }
}
columns.Bound(p => p.TimeType).Hidden(true).ClientTemplate("#= (typeof TimeType != 'undefined') ? TimeType.Description : ''#");
but the following code doesn't cause me any issues
but code doesn't cause me any issues
columns.Bound(p => p.TimeType).Hidden(true).ClientTemplate("#= typeof TimeType == 'undefined' || TimeType == null ? '' : TimeType.Description #");
Why is this? It seems that all the values (i.e. 'TimeType.Description') are being evaluated in the expression before actually checking to see if they should be evaluated based on the inline if condition. Is this a bug? Is this me not understanding how templates work? Is my code somehow bad, or only works on certain types?