Hi,
I want to use a multiselect widget inside of a grid. The applicaton is Angular 1.6 with typescript.
The model consists of a comma separated string.
Problem: the widget is opened and initialized with the correct values. But when I change the widget these modifications do not update the model.
This is what I've got so far:
module kendo.data.binders.widget { export class commaseparatedvalue extends kendo.data.Binder { init(widget, bindings, options) { kendo.data.Binder.fn.init.call(this, widget.element[0], bindings, options); } refresh() { // this is called correctly! console.log("refresh", this.bindings, this.element); var that = this; var value = that.bindings["commaseparatedvalue"].get(); var values = value ? value.split(",") : []; that.element.value(values); } change() { // this is not called console.log("change", this.bindings, this.element); } }}
any help greatly appreciated!
Thank you!


Hello,
I have a TreeList with a nullable date field to be displayed. The following line adds the field to my Treelist:
columns.Add().Field(e => e.LastUsed).Format("{0:MMMM d, yyyy}");
If the date field has a value, then the date is displayed. If it is null, the word "null" is displayed. I would like to be able to display either a custom text string like "N/A" or a blank, instead of the word "null".
I also don't want to convert the Treelist to all javascript.
Thank you very much for your assistance.
Dave

I'm diagramming some product structures with 50-100 parts (3 levels). Rendering is taking about a minute (sometimes longer) in IE11 and sometimes the page is dying. If I break, it's always in kendo.all.min.js.
Does this sound right? It seems slow...
Attaching a picture of a typical diagram and my initial code. I'm using Kendo UI v2015.2.902
<div id="diagram" style="width: 100%; height: 800px;"> @(Html.Kendo().Diagram() .Name("diagram") .DataSource(dataSource => dataSource .Read(read => read.Action("_GetParts", "Diagram", new { partId = Model.PartId, level = Model.Level })) .Model(m => m.Children("Children")) ) .Editable(false) .Layout(l => l .Type(DiagramLayoutType.Tree) .Subtype(DiagramLayoutSubtype.Tipover) .HorizontalSeparation(10) .VerticalSeparation(10) ) .ConnectionDefaults(cd => cd .Stroke(s => s .Color("#bbb") .Width(1) ) .Editable(false) ) .ShapeDefaults(sd => sd .Visual("visualTemplate") ) .Events(e => e.Select("onClick"))
<script type ="text/javascript">
function visualTemplate(options) {
var dataviz = kendo.dataviz;
var g = new dataviz.diagram.Group();
var dataItem = options.dataItem;
var imageLink = "../../Content/images/cc/" + dataItem.CommCode + ".png";
var lc = dataItem.Lifecycle;
if (lc == null) {
lc = "?";
}
if (dataItem.IsParentLevel) {
g.append(new dataviz.diagram.Rectangle({
width: 400,
height: 50,
stroke: {
width: 1,
color: "#000"
},
fill: {
color: "#efefef"
}
}));
g.append(new dataviz.diagram.Image({
source: imageLink,
x: 10,
y: 3,
width: 16,
height: 16
}));
g.append(new dataviz.diagram.TextBlock({
text: dataItem.PartNum,
x: 32,
y: 3,
color: "#000",
fontSize: "14"
}));
g.append(new dataviz.diagram.TextBlock({
text: dataItem.ItemDesc,
x: 12,
y: 28,
color: "#000",
fontSize: "9"
}));
g.append(new dataviz.diagram.TextBlock({
text: lc,
x: 300,
y: 3,
color: "#000",
fontSize: "9"
}));
g.append(new dataviz.diagram.Rectangle({
width: 4,
height: 50,
fill: dataItem.DiagramColor,
stroke: {
width: 0
}
}));
} else {
g.append(new dataviz.diagram.Rectangle({
width: 120,
height: 36,
stroke: {
width: 1,
color: "#000"
},
fill: {
color: "#efefef"
}
}));
g.append(new dataviz.diagram.Image({
source: imageLink,
x: 10,
y: 3,
width: 16,
height: 16
}));
g.append(new dataviz.diagram.TextBlock({
text: dataItem.PartNum,
x: 32,
y: 3,
color: "#000",
fontSize: "10"
}));
g.append(new dataviz.diagram.TextBlock({
text: dataItem.ShortDesc,
x: 10,
y: 23,
color: "#000",
fontSize: "8"
}));
g.append(new dataviz.diagram.Rectangle({
width: 3,
height: 36,
fill: dataItem.DiagramColor,
stroke: {
width: 0
}
}));
}
return g;
}
</script>
)</div>
I am trying to filter a Kendo UI Grid based on Kendo UI DatePicker date but getting this error: "Error: Unable to get property 'dataSource' of undefined or null reference". As shown below, I am trying to pass the selected date as a parameter to the controller of the Kendo Grid.
Below is my View:
@model RainfallReporting.Models.RainFallData
@{
ViewBag.Title = "RainFall Data";
}
<h2>Daily RainFall Data</h2>
<div class="container">
<div class="row">
<p></p>
@(Html.Kendo().DatePicker()
.Name("rfallDate")
.Events(e => e.Change("onChange"))
)
<p></p>
@(Html.Kendo().Grid<RainfallReporting.Models.RainFallData>()
.Name("rfallGrid")
.AutoBind(false)
.Selectable()
.Columns(columns =>
{
columns.Bound(c => c.RecordNo);
columns.Bound(c => c.TimeStamp).Title("RainFall Date").Format("{0:dd-MM-yyyy}");
columns.Bound(c => c.BattVolts_Min);
columns.Bound(c => c.LoggerTemp_Min);
columns.Bound(c => c.LoggerTemp_Max);
columns.Bound(c => c.Rainfall_Tot);
columns.Bound(c => c.Total);
}
)
.DataSource(datasource => datasource
.Ajax()
.PageSize(100)
.Model(model =>
{
model.Id(rfall => rfall.RainFallDataId);
model.Field(rfall => rfall.RainFallDataId);
}
)
.Read(read => read.Action("GetRainfall_ByDate", "RainFall").Data("additionalData"))
)
//Set grid sortable
.Sortable()
//set grid selectable
.Selectable()
//set grid pagable
.Pageable(pageable =>
{
pageable.Refresh(true);
pageable.PageSizes(true);
}
)
)
<script>
function additionalData(e) {
var value = $("#rfallDate").data("kendoDatePicker").value();
return { selectedDate: value }; // send the filter value as part of the Read request
}
function onChange() {
var grid = $("rfallGrid").data("kendoGrid");
grid.dataSource.read(); // rebind the Grid's DataSource
}
</script>
</div>
</div>
This is my controller that returns data for the Kendo UI Grid:
public class RainFallController : Controller
{
private RAINFALLDBEntities db = new RAINFALLDBEntities();
public ActionResult GetRainfall_ByDate([DataSourceRequest]DataSourceRequest request,DateTime selectedDate)
{
try
{
var query = from c in db.RainFallDatas
where c.TimeStamp == selectedDate
select c;
query.ToList();
DataSourceResult output = query.ToDataSourceResult(request);
return Json(output, JsonRequestBehavior.AllowGet);
}
catch (Exception ex)
{
return Json(ex.Message);
}
}
}
Hello,
I have written the code to transfer an element in the source listbox by double clicking on it as follows
function RegisterTransfer(ctrlId)
{
var listBox = $("#" + ctrlId).data("kendoListBox");
listBox.wrapper.find(".k-list").on("dblclick", ".k-item", function (e) {
listBox._executeCommand("transferTo");
});
}
this works fine.
But, I am unable to achieve the reverse scenario.
viz; I can't transfer an element in the destination listbox back to the source listbox by double clicking on it.
Any help would be appreciated!
Thanks,
Niranjan
Hi,
when I use trigger select in combobox it is fired twice and the second time it is fired the item property comes to null.
Has anyone had a similar problem and can you help me?
Thank you.
BR,
MCosta
My co-workers are forcing me to include all the little kendo JS files separately rather than just using "all".
This is rather difficult since kendo.spreadsheet.js has dependencies, but I don't know what they are. Currently I am stuck on kendoColorPalette. No idea which JS file to include.
Does anyone know which of the JS files to include (in what order) to be able to use Spreadsheet?
Thanks!

Hi,
I have implemented a popover which is called from a tab-strip element. The popover opens when the tab-strip element is clicked on and does not close when it is clicked again. While debugging I found out the popover open() is called after the close(), data-close is not been called.
The popover closes when we click anywhere outside the popover.
Thank you,

I want kendo drop down list to be filterable by user typing but the data source is from my angularjs. I could only find example with server filtering. I tried to add filterable="true" but not sure what else need to add. Thanks.
<select id="fac" kendo-drop-down-list style="width: 260px" filterable="true"
k-option-label="' Choose Region or Home '"
k-data-text-field="'FacilityName'"
k-data-value-field="'FacCode'"
k-data-source="facilityList"
k-on-change="facilityChange(kendoEvent)"
data-ng-model="selectedfacility"></select>