I found out that defining "Editable(false)" for a model field doesn't seem to work when I've chosen GridEditMode.PopUp:
@(Html.Kendo().Grid<Pharmacy>() .Columns(columns => ...) .Editable(editable => editable.Mode(GridEditMode.PopUp)) .DataSource(dataSource => dataSource .Ajax() .Model(model => { model.Id(p => p.Id); model.Field(p => p.Id).Editable(false); model.Field(p => p.MyReadOnlyField).Editable(false); })))In this case, the "Id" field and the "MyReadOnlyField" field will be shown in the popup as editable - which obviously is not the expected behavior.
Is this done intentional or is it a bug that Model definition doesn't work correctly with PopUp edit mode? Of course I can define a custom template, but that's not what I really want... from my view it's a bug or missing feature.
Thanks in advance,
Dimitrij
Does ASP.NET MVC scheduler support integration with google calender or outlook?
Thank you..
Hi,
I'm Thinking of moving from kendo ui html5 to the mvc version but I am worried about performance problem when moving to large scale (2,000,000 + users per month)
Has anybody experienced issues with the MVC edition of kendo that might not happen in the Kendo UI html5 version?
Thanks
Hi
please i have create my grid and set bootstrap theme to it and add 3 custom button on it and every thing works fine but buttons not centered in each grid cell it's align to right (i have add rtl css) as you can see in attached image
so please how can i set them center vertically and Horizontally in each grid cell ?
my attempt (Where I have Kendo DropDownList 1 as #Type and Kendo DropDownList 2 as #Units:
$('#Type').change(function (e) {
//if (e.target.value == "Electirc") {
var val = e.target.value;
var ddL = $('#Units').data("kendoDropDownList")
if (val == "Electric") {
ddl.dataSource.data({Text:"-", value:"null"},{Text:"kW", value:"kW"},{Text:"GJ", value:"GJ"})
//$("#Units").html("<option value='null'>item1:-</option><option value='kW'>item1: kW</option><option value='GJ'>item1: GJ</option>");
}
})
The goal would be to have the contents of DDL2 to change based on the selection by DDL1
I'm starting to build a Telerik UI for ASP.NET MVC project, just like the Grid Demo on http://demos.telerik.com/aspnet-mvc/
And i got this error when i debug project.
What problem?
I am using UI for MVC 2015.1.318
I am replacing user admin lists with Telerik grids, but need to call the original views for CRUD. I have reviewed the documentation at http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/grid/server-editing as well as several forum posts, but the Edit command button always calls the inline editor.
My grid
@(Html.Kendo().Grid(Model.UsersList) .Name("grid") .Columns(columns => { columns.Bound(u => u.DisplayName); columns.Bound(u => u.AccountName); columns.Bound(u => u.Email); columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200); }) .Editable(editable => editable.Mode(GridEditMode.InLine)) .Pageable() .Sortable() .Scrollable() .DataSource(dataSource => dataSource .Ajax() .ServerOperation(false) .PageSize(20) .Sort(sort => sort.Add("AccountName").Ascending()) .Model(model => model.Id(u => u.UserId)) .Update(update => update.Action("Edit", "UserAdmin")) .Destroy(destroy => destroy.Action("Delete", "UserAdmin")) ))There is a UserAdminController.cs with Edit and Delete methods. Here is the Edit:
public async Task<ActionResult> Edit(string id){ if (id == null) { return new HttpStatusCodeResult(HttpStatusCode.BadRequest); } var editUser = await UserManager.FindByIdAsync(id); if (editUser == null) { return HttpNotFound(); } UserDetailsViewModel vm = new UserDetailsViewModel() { Id = editUser.Id, Email = editUser.Email, DisplayName = editUser.DisplayName, SelectedAccountId = editUser.AccountId, }; // System Admins can assign Account to users, so get a list if (User.IsInRole("System Admin")) { vm.AvailableAccounts = DataRepo.GetAccountListForDdl().ToList(); } await Edit_SetupRoles(editUser.Id, vm); vm.ProviderId = editUser.ProviderId; if (editUser.ProviderId != null) vm.ProviderName = DataRepo.GetProviderName(editUser.ProviderId); vm.AccessLevelsAssigned = DataRepo.GetAssignedUserAccessLevels(editUser.Id); vm.AccessLevelsPool = DataRepo.GetAvailableUserAccessLevels(editUser.Id, editUser.AccountId); vm.AccountAndClients = DataRepo.GetAccountAndClientListForDdl(editUser.AccountId).ToList(); return View(vm);}Where is this going off the rails?
Best,
Scott
I'm adding an item and then wanting to refresh the TreeView. It works every other time. The node is always added, but the treeview is refreshed to display it only after I click to add another node. At that time, both new nodes show up. I'm guessing that the first ajax call hasn't completed when the treeview.dataSource.read() statement is reached. Is there a way to execute a "wait" until the AddNode statement has completed?
Here's my javascript:
// Add Node$("#createCategory").click(function () { var name = $("#newCategory").val(); if (name != "") { $.ajax({ url: '@Url.Action("AddNode","Categories")', type: "POST", data: { CategoryName: name } }); kendoConsole.log("Adding " + name); //var treeview = $("#treeview").data("kendoTreeView"); treeview.dataSource.read(); } else { kendoConsole.log("Please enter non-empty name"); } $("#newCategory").val("") $("#newCategory").focus()});