Hi
How can i have both way of filtering data in one column?
I need to have list of items (like multiselect) and operators (>,<, !=) too. When i set "multi:true" then i not see operators anymore.
Is there a way to sort on a hidden column instead to the visible column?
I need to sort on a datetime with a specific format but it doesn't work as it's a string
thank
I recently worked on a Kendo pie chart, and we needed to remove all the extra margin and padding around the chart, and it needed a height of 300px. We then exploded one slice, as explained in the documentation.
After doing this, the chart is rendered with the exploded slice being outside the bounds of the chart.
I started with the example from the documentation page above and changed it to how we have ours, namely adding a static chartArea height and 0 margin, setting plotArea margin and padding to 0, and setting the series padding to 0.
http://dojo.telerik.com/@john.washam@360vinspin.com/EGENij
Is this expected behavior or a bug?
i have a requirement with one grid and dropdownlist.
grid has columns ID, Name, Type , Source, Destination
When the destination is empty or when destination column contains double hyphen "--" i need to update the column value to the selected value of the dropdown (this dropdown is not a part of grid)
I tried to provide defaultValue while declaring the model but it dint work, here is the code snippet
schema: {
model: {
fields: {
DestinationLocator: {
type: "string", defaultValue: $("#myDDL").data("kendoDropDownList").text()
}
}
}
I even tried to loop through the Grid and update the column manually, this worked when there are less number of rows, when the Grid has more than 500 rows, the application does not respond.
var grid = $("#myGrid").data("kendoGrid");
var dataitem = grid.dataSource.data();
var destLocText = $("#myDDL").data("kendoDropDownList").text();
for (var i = 0; i < dataitem.length; i++) {
if (dataitem[i].DestinationLocatorID == null || dataitem[i].DestinationLocatorID == '' || dataitem[i].DestinationLocatorID == '--') {
dataitem[i].set("DestinationLocator", destLocText);
}
}
Please help me.
data-bind=
"text: getDate(selectedBlock.data.EndDate)"
Hello,
When values are already selected, the read filter no longer locates on page 1.
This only happens when values are selected, I get the impression that the read with filter remains on the same page as the read after ValueMapper.
EditorFor
@using Newtonsoft.Json;
@model IEnumerable<int>
@{
Layout = ViewBag.Layout ??
"_bootstrap.cshtml"
;
ViewData.TemplateInfo.HtmlFieldPrefix = ViewData.TemplateInfo.HtmlFieldPrefix.Replace(ViewData.ModelMetadata.PropertyName,
""
).Trim(
'.'
);
var
propertyName = ViewData[
"name"
] ==
null
? ViewData.ModelMetadata.PropertyName : ViewData[
"name"
].ToString();
var
editorHtmlAttributes = Html.GetUnobtrusiveValidationAttributes(propertyName, ViewData.ModelMetadata);
var
htmlAttributes = ViewBag.HtmlAttributes;
if
(htmlAttributes !=
null
)
{
if
(htmlAttributes is IDictionary<string, object>)
{
editorHtmlAttributes.Merge((IDictionary<string, object>)htmlAttributes);
}
else
{
editorHtmlAttributes.Merge(
new
RouteValueDictionary(htmlAttributes));
}
}
editorHtmlAttributes.Merge(
"class"
,
"form-control"
);
var
populationParams = JsonConvert.SerializeObject(ViewBag.PopulationParams);
}
@(Html.Kendo().MultiSelect()
.Name(propertyName)
.DataTextField(
"Text"
)
.DataValueField(
"Value"
)
.Filter(
"contains"
)
.Value(Model)
.HtmlAttributes(editorHtmlAttributes)
.DataSource(source =>
{
source.Custom()
.ServerFiltering(
true
)
.ServerPaging(
true
)
.PageSize(80)
.Type(
"aspnetmvc-ajax"
)
.Transport(transport =>
{
transport.Read(
"_To"
,
"Population"
,
new
{ area =
"Template"
, populationParams = populationParams });
})
.Schema(schema =>
{
schema.Data(
"Data"
)
.Total(
"Total"
);
});
})
.Virtual(v => v.ItemHeight(26).ValueMapper(
"valueMapper"
+ propertyName))
.Events(e =>
{
e.DataBound(
"onDataBound"
+ propertyName).Change(
"onDataBound"
+ propertyName);
})
)
<div id=
"count-@(propertyName)"
class=
"text-right"
>
</div>
<script>
var
cookieIds =
"templateemailable-@(propertyName)"
;
function
valueMapper@(propertyName)(options) {
$.cookie(cookieIds, JSON.stringify(options.value), { path:
'/'
});
$.ajax({
url:
"@Url.Action("
_ToValueMapper
", "
Population
", new { area = "
Template
", populationParams = populationParams })&cookieIds="
+ cookieIds,
type:
"GET"
,
success:
function
(data) {
options.success(data);
}
})
}
function
onDataBound@(propertyName)(e) {
$(
"#count-@(propertyName)"
).html(e.sender.value().length);
}
</script>
@Html.ValidationMessage(ViewData.ModelMetadata,
new
{ name = ViewData[
"name"
] })
@
if
(!string.IsNullOrEmpty(ViewData.ModelMetadata.Description))
{
<p class=
"help-block"
>@Html.Raw(ViewData.ModelMetadata.Description.Localize())</p>
}
Controler
public
virtual
ActionResult _To([DataSourceRequest] DataSourceRequest request,
string
populationParams)
{
var result = (
new
ToDataSource()).GetSelectListItems(
null
, populationParams);
return
Json(result.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
}
public
virtual
ActionResult _ToValueMapper(
string
populationParams,
string
cookieIds)
{
var values =
new
List<
string
>();
if
(Request.Cookies[cookieIds] !=
null
)
{
values = Server.UrlDecode(Request.Cookies[cookieIds].Value).JsonToObject<IEnumerable<
string
>>().ToList();
Request.Cookies[cookieIds].Expires = DateTime.Now.AddDays(-1);
}
var indices =
new
List<
int
>();
if
(values !=
null
&& values.Any())
{
var list = values.ToList();
var source = (
new
ToDataSource()).GetSelectListItems(
null
, populationParams);
var index = 0;
foreach
(var item
in
source)
{
if
(list.Contains(item.Value))
{
indices.Add(index);
list.Remove(item.Value);
if
(!list.Any())
return
Json(indices, JsonRequestBehavior.AllowGet);
}
index += 1;
}
}
return
Json(indices, JsonRequestBehavior.AllowGet);
}
Thank you for your help
I am trying to apply localization for currency using the NumericTextBox, but I am not observing any changes when I apply a locale.
I can't piece together how to apply localization for a specific country/locale (e.g.,Germany; "de") on load.
Is the application of the localization set as an attribute within the <kendo-numerictextbox> tag, or should I be applying the localization within a method.
Here is what I have so far:
@Component({
selector: 'my-app',
template: `
<kendo-numerictextbox format="c3" locale="de" [(ngModel)]="numericValue" [min]="-10" [max]="100" [autoCorrect]="false">
<kendo-numerictextbox-messages
increment="Custom increment"
decrement="Custom decrement"
></kendo-numerictextbox-messages>
</kendo-numerictextbox>
<hr/>
<div>Underlying Value:<input type="number" [(ngModel)]="numericValue"></div>
`
})
export class AppComponent {
public numericValue: number = 987654.321;
}
I would expect the value to be displayed as "987.654,321 €".