kendo-asp.net-mvc

Kendo Autocomplete Displays Two Suggestion Lists

99封情书 提交于 2019-12-11 04:57:59
问题 My Kendo autocomplete control retrieves a Json list successfully. Unfortunately, it calls the MVC controller method twice and creates two suggestion lists. The duplicate list is displayed directly behind the first. When a value is selected from the first suggestion list, the list disappears, but the duplicate list remains visible. I am using a wrapper for the autocomplete control as shown below. I've confirmed that the control is not being referenced in any of the page scripts. The control is

Kendo UI Grid not populating after call to read

↘锁芯ラ 提交于 2019-12-11 04:24:58
问题 OK I have another and I'm sure I'm missing something simple again. Populating the Kendo Grid with a json result set. The load is triggered by a selection from a kendo dropdownlist control. I can see the data is returned from my webapi and converted to the json result. But the data is not displayed in the grid. What I'm missing doing wrong? Here is how grids view is added: <div id="messageGridArea"> @Html.Partial("Messages") </div> Here is dropdownlist definition: @(Html.Kendo().DropDownList()

How to access Related Data built By the EF

对着背影说爱祢 提交于 2019-12-11 04:14:12
问题 Similar to the simple Membership UserProfiles to Roles in the Table UserInRoles I have created a Relationship between UserProfiles to Clients in the table UserInClients with this code modelBuilder.Entity<UserProfiles>() .HasMany<dbClient>(r => r.Clients) .WithMany(u => u.UserProfiles) .Map(m => { m.ToTable("webpages_UsersInClients"); m.MapLeftKey("ClientId"); m.MapRightKey("UserId"); }); My UserProfiles has an public virtual ICollection<dbClient> Clients { get; set; } and my Clients has an

Can anyone help how to use event from Html.Kendo().CheckBoxFor(m => m.Enable)

ぃ、小莉子 提交于 2019-12-11 04:13:39
问题 I am new to Kendo. I am using Html.Kendo().CheckBoxFor(m => m.Enable) in MVC cshtml, and I'm unable to add a change event for this checkbox. The Html.Kendo().DropDownListFor has .Events(e => e.Change("PopulateCountry")) , but I dont see same type of event in CheckBox . Can anyone help on this? 回答1: The Html.Kendo().CheckBoxFor helper renders a regular html5 checkbox. It is not actually a kendo widget like Html.Kendo().DropDownListFor creates. I believe this is why the helper for CheckBox is

Kendo MVC grid with editable enum column

≯℡__Kan透↙ 提交于 2019-12-11 02:45:20
问题 I have a simple model that I need to display and edit in Kendo's MVC Grid component. public class MyModel { public int Id {get; set;} public string SomeProperty {get; set;} public MyEnum MyEnum {get; set;} } public enum MyEnum { FirstItem = 1, SecondItem = 2, ThirdItem = 3 } And I have my grid set up like this: @(Html.Kendo() .Grid<MyModel>() .Name("grid").Columns(columns => { columns.Bound(o => o.SomeProperty).Width(200); columns.Bound(o => o.MyEnum).Width(200); columns.Command(command => {

Unable to style borders of a row of Kendo grid

我只是一个虾纸丫 提交于 2019-12-11 02:45:04
问题 I'm attempting to style an MVC kendo grid based on values in the underlying datasource. I have a mechanism that seems to work, but certain style elements (notably borders) do not seem to accept the new style class, whereas other elements (row background color) work fine. Grid: @(Html.Kendo().Grid(Of RTFVM)().Name("RealTimeFinancials") _ .Events(Function(x) x.DataBound("LineItems_Databound")) _ .Columns(Sub(c) c.Bound(Function(x) x.Line.LineItem).HtmlAttributes(New With {.style = "text-align

Kendo grid duplicate records inserted

前提是你 提交于 2019-12-11 01:57:44
问题 I have a kendo grid in inline editing mode. When I press "Add new item" button, new row is added and set to the edit mode. By pressing the "Update" button multiple time, I'm able to insert duplicate records into database. Is there a possibility to disable Update button after the first click? Also row selection on kendo grid is lost after insert is performed. Is that normal behavior? 回答1: This would happen if you don't return the ID of the newly inserted records. The Kendo DataSource would

Kendo ui - how to tie validation to mvc model attributes

社会主义新天地 提交于 2019-12-11 01:51:15
问题 From reading the posts in this thread - and being unable to post the question there for some bizarre reason :( I will ask it here in hope of getting a solution Am I write in saying that I have to do validation like below.. I add the html5 attribute (data-required-msg/validationMessage) to the textbox and the required attribute as well.. I make a span for the invalid msg and tie it to the field with the "data-for" attribute. The message "Please enter name" should appear in this span then.

Selecting a row from a Kendo Grid programmatically

寵の児 提交于 2019-12-11 01:34:27
问题 I have got a grid and one of its columns is a template with a checkbox in it: .Name("grid") .Columns(columns => { columns.Bound(c => c.Id).ClientTemplate("<input type=\"checkbox\" id=\"chk_#=Id#\" class=\"gridCK\" onclick=\"zzz(this)\"/>"); When I check the checkbox, I want its row to become selected (and vice-versa). I have tried the following: function zzz(e) { var id = e.id; var grid = $("#grid").data("kendoGrid"); var data = grid.dataSource.data(); var res = $.grep(data, function (d) { if

checkbox event is not firing with jquery

不羁岁月 提交于 2019-12-11 01:08:41
问题 I have got checkbox row in parent grid and checkbox row in child grid as well in Hierarchy grid mode using kendo UI. the architecture is like this... I have got four rows in parent grid,in that one column is checkbox and for every parent row i have got one child grid with 4 rows in it and one checkbox column as well... If i click the checkbox in parent grid row i need to access the checkboxes in child grid column related to this row only and need to set the checked attribute as true for that