I have 2 Kendo UI Listboxes, I am not able to drag items from Model.PTLUser.RolesToRemove to the other listbox. I dont see any javascript errors in the console. My code currently looks like this.
<
div
role
=
"application"
class
=
""
id
=
"RolesList"
>
@(Html.Kendo().ListBox()
.Name("Model.PTLUser.RolesToRemove")
.DataValueField("RoleName")
.DataTextField("RoleName")
.Draggable(true)
.DropSources("Model.PTLUser.RolesToAssign")
.ConnectWith("Model.PTLUser.RolesToAssign")
.BindTo(Model.RolesAvailable)
.Selectable(ListBoxSelectable.Single)
)
@(Html.Kendo().ListBox()
.Name("Model.PTLUser.RolesToAssign")
.DataValueField("RoleName")
.DataTextField("RoleName")
.Draggable(true)
.DropSources("Model.PTLUser.RolesToRemove")
.ConnectWith("Model.PTLUser.RolesToRemove")
.BindTo(new List<
string
>())
.Selectable(ListBoxSelectable.Single)
)
</
div
>
I am creating a treeview, loaded from remote hierarchical data, similar to
http://demos.telerik.com/aspnet-mvc/treeview/remote-data-binding
I am trying to understand this line in the controller:
hasChildren = e.Employees1.Any()
I assume that the employee model has a property where it checks for children. Where can I actually look at the model? Can I download all the demos along with the data model?
I have server bound grid and a set message to be displayed when no data exists. Below is my aspx view for the grid:
<% Html.Kendo().Grid(Model.BillingReport)
.Name(
"billing_grid"
)
.Columns(columns =>
{
columns.Bound(c => c.BillDate).Format(
"{0:M/d/yyyy}"
);
columns.Bound(c => c.Account);
columns.Bound(c => c.BillProgram);
columns.Bound(c => c.Total).Format(
"{0:c}"
);
})
.NoRecords(
"No records found."
)
.Resizable(resizable => resizable.Columns(
true
))
.DataSource(dataSource => dataSource.Server())
.Render(); %>
On the rendered page, I see the column headers and nothing in the grid. On the browser code, I see:
<
tr
class
=
"k-no-data"
>
<
td
colspan
=
"5"
></
td
>
</
tr
>
Why am I not seeing the message?
Hello Kendo UI support team,
We need convert legacy APS.NET Form based project to MVC. In legacy project we used Telerik RadFileExploer control to handle file management. But I did not find equivalent control in Kendo UI. Is there any similar control in Kendo UI?
Thanks in advance!
Should the scheduler be auto generating the RecurrenceId when creating a recurrence exception? When following the example in the Documentation section I am setting things up as it says and everything seems to work except the RecurrenceId. When I create a recurrence exception the RecurrenceId is always set to null.
Here are some pictures with explanations:
Attached File 1: This is a view of the object when I am creating the recurrence exception
Attached File 2: This is a picture of what the scheduler looks like after the initial save. It looks fine and it looks like the recurrence exception is connected to the recurrence.
Attached File 3: This is a picture after the refresh. You can see that now what was supposed to be the recurrence exception is being treated as not associated with the recurrence at all.
Have listbox...
Works fine... chrome, edge... but on IE 11 scrolling does not seem to work... have to use the up/down arrows...
@(Html.Kendo().DropDownList()
.Name("admin_tableName")
.DataTextField("Text")
.DataValueField("Text")
.OptionLabel("- Select -")
.DataSource(source => source
.Custom()
.Transport(transport => transport
.Read(read => read.Action("GetTableNames", "Admin"))
)
)
.HtmlAttributes(new { style = "width: 100%" })
.Events(e => e.Change("admin_tablename_change"))
)
Greetings,
I have a Telerik MVC Grid with in-line editing. It has custom validation to check if the primary key already exists, but it runs the validation when you tab out AND click "Update" in-line. How do I change the validation to occur and subsequently the error message to pop up ONLY on clicking "Update" and not when leaving the textbox? Here is my code below:
01.
(
function
($, kendo) {
02.
$.extend(
true
, kendo.ui.validator, {
03.
rules: {
// custom rules
04.
codevalidation:
function
(input, params) {
05.
if
(input.is(
"[name='Code']"
) && input.val() !=
""
) {
06.
input.attr(
"data-codevalidation-msg"
,
"Code must not already exist."
);
07.
08.
var
isGood =
true
;
09.
var
gridData = $(
"#grid"
).data(
"kendoGrid"
).dataSource.data()
10.
11.
console.log(input.val());
12.
for
(
var
i = 1; i < gridData.length; i++) {
13.
console.log(gridData[i].Code == input.val().toUpperCase())
14.
if
(gridData[i].Code == input.val().toUpperCase())
15.
isGood =
false
;
16.
}
17.
console.log(
"returning "
+ isGood);
18.
return
isGood;
19.
}
20.
else
{
21.
22.
return
true
;
23.
console.log(
"returning true at end"
);
24.
}
25.
}
26.
},
27.
messages: {
//custom rules messages
28.
codevalidation:
function
(input) {
29.
// return the message text
30.
return
input.attr(
"data-val-codevalidation"
);
31.
}
32.
}
33.
});
34.
})(jQuery, kendo);
Is there a way to do this without directly passing a hard coded hex value?
Currently I am achieving this by adding a few empty series inside each chart, but would like to know if there is a tidy way of doing it.
01.
<div
class
=
"col-xs-6"
>
02.
@(Html.Kendo().Chart().Theme(
"sass"
)
03.
.Name(
"lines1"
)
04.
.Title(
"g1"
)
05.
.Series(s =>
06.
{
07.
s.Line(
new
List<
double
>());
08.
s.Line(
new
List<
double
> {1.7, 1.63, 1.72, 1.87, 2.1, 1.2, 1, 0.9}).Name(
"g1"
);
09.
})
10.
.HtmlAttributes(
new
{ style =
"height:200px;"
})
11.
)
12.
</div>
13.
<div
class
=
"col-xs-6"
>
14.
@(Html.Kendo().Chart().Theme(
"sass"
)
15.
.Name(
"lines2"
)
16.
.Title(
"g2"
)
17.
.Series(s =>
18.
{
19.
s.Line(
new
List<
double
>());
20.
s.Line(
new
List<
double
>());
21.
s.Line(
new
List<
double
> {1.7, 1.63, 1.72, 1.87, 2.1, 1.2, 1, 0.9}).Name(
"g2"
);
22.
})
23.
.HtmlAttributes(
new
{ style =
"height:200px;"
})
24.
)
25.
</div>
26.
<div
class
=
"col-xs-6"
>
27.
@(Html.Kendo().Chart().Theme(
"sass"
)
28.
.Name(
"lines3"
)
29.
.Title(
"g3"
)
30.
.Series(s =>
31.
{
32.
s.Line(
new
List<
double
>());
33.
s.Line(
new
List<
double
>());
34.
s.Line(
new
List<
double
>());
35.
s.Line(
new
List<
double
> {1.7, 1.63, 1.72, 1.87, 2.1, 1.2, 1, 0.9}).Name(
"g3"
);
36.
})
37.
.HtmlAttributes(
new
{style =
"height:200px;"
})
38.
)
39.
</div>
40.
<div
class
=
"col-xs-6"
>
41.
@(Html.Kendo().Chart().Theme(
"sass"
)
42.
.Name(
"lines4"
)
43.
.Title(
"g4"
)
44.
.Series(s =>
45.
{
46.
s.Line(
new
List<
double
>());
47.
s.Line(
new
List<
double
>());
48.
s.Line(
new
List<
double
>());
49.
s.Line(
new
List<
double
>());
50.
s.Line(
new
List<
double
> {1.7, 1.63, 1.72, 1.87, 2.1, 1.2, 1, 0.9}).Name(
"g4"
);
51.
} )
52.
.HtmlAttributes(
new
{ style =
"height:200px;"
})
53.
)
54.
</div>