Is there a way to disable drag and drop for tasks in the scheduler?
I want my users only to be able to edit tasks through the edit form.
/Jonas
I have a very simple listview that I cannot get to show any data.
View:
@(Html.Kendo().ListView<PortalContext.Root>()
.Name("leafView")
.TagName("div")
.ClientTemplateId("leafTemplate")
.DataSource(dataSource => {
dataSource.Model(model => { model.Id(p => p.RootId);
model.Field<string>(f => f.ShortName);
});
dataSource.Read(read => read.Action("Leafs", "Home").Data("branchLevel"));
})
)
<script type="text/x-kendo-tmpl" id="leafTemplate">
<div style="height:100px">
#: ShortName #
</div>
</script>
I have a treeview that refreshes the data onSelect
function onSelect(e) {
if (treeview.dataItem(e.node).IsBranch) {
branchId = treeview.dataItem(e.node).id;
$("#leafView").data("kendoListView").dataSource.read();
}
}
function branchLevel() {
return {
branchId: branchId
};
}
I have simplified a few things but my controller looks like this and is basically returning a list of objects.
public ActionResult Leafs([DataSourceRequest]DataSourceRequest request, int? branchId) {
return Json(ViewModel.Roots.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
}
Any ideas why this may not be working?
Bill
I use the Ajax Editing to manage the record in my grid .
I would like call the controller before edit the selected record to check if the record is not lock.
I would like have this process :
- Click on "Edit" buttom on grid,
- Call the action controller to check the lock,
-> If record lock, Abort Edit record,
-> If record is not lock, Edit record.
Do you know of a great way to make this process ?
Thanks
I set up a simple grid like this using the Razor syntax:
@(Html.Kendo().Grid<
GridCustomPopupTemplate.Models.Person
>().Name("persons")
.DataSource(dataSource => dataSource
.Ajax()
.Model(model => model.Id(m => m.PersonID))
.Read(read => read.Action("GetPersons", "Home"))
.Update(up => up.Action("UpdatePerson", "Home"))
)
.Columns(columns =>
{
columns.Bound(c => c.PersonID).Width(200);
columns.Bound(c => c.Name);
columns.Command(cmd => {
cmd.Edit();
});
})
.Pageable()
.Sortable()
.Editable(ed => ed.Mode(GridEditMode.PopUp).TemplateName("Person"))
)
Hello, is it possible to have a "Preview Row" (see attached picture) with MVC Grid?
robert
I need to stop collapsing a detail row in kendo grid in some cases, but my code is not working:
var detailGrid = $("#grid-details").kendoGrid({
< ....>
detailCollapse: function (e) {
//operator.views.common.CheckDetailsRow(e.detailRow);
e.preventDefault();
return false;
},
<......>
}).data("kendoGrid");
Hi,
I have a Kendo Grid in which I use Data method in Read.Action to pass parameters to a controller action. The code is:
<% Html.Kendo().Grid<EvaluationsQuestionsEvaluationPillarsGridViewModel>()
.Name("Pillars")
.DataSource(dataSource => dataSource
.Ajax()
.Model(model => model.Id(a => a.EvaluationMasterPillarId))
.ServerOperation(true)
.Read(read => read.Action("LoadEvaluationsQuestionsEvaluationPillarsGridAjax", "Evaluations")
.Data("onLoadEvaluationsQuestionsEvaluationPillarsGridData"))
)​
......
function onLoadEvaluationsQuestionsEvaluationPillarsGridData(e) {
var evaluationVersionId = $('#evaluationVersionId').val(); // "evaluationVersionId" is set beforehand
var showDeletedCheckbox = $('#Checkbox1').val();
return { evaluationVersionId: evaluationVersionId, showDeleted: showDeletedCheckbox }
}
public ActionResult LoadEvaluationsQuestionsEvaluationPillarsGridAjax(DataSourceRequest request, string evaluationVersionId, bool showDeleted)
{
......
But the controller action "LoadEvaluationsQuestionsEvaluationPillarsGridAjax" is not even invoked. I need help on this. Thanks.
​Hi there, I was wondering if someone could help me. How can I bind my dropdown list to a viewbag to ensure it's getting it's data from the right place? I found a couple of guides but they didn't work for my scenario. Here is my code.
// #DDL - Broker Companies
IEnumerable<SelectListItem> thestats = seabrokersData.tbl_requirement_status
.Select(c =>
new
SelectListItem
{
Value = c.id.ToString(),
Text = c.thet_status
});
ViewBag.theStatus = theStatus;
I would like my Kendo Dropdown to use the above viewbag to populate itself. How can I do this?
Many thanks
I'm having some accessibility issues with my Kendo MVC Grid. When using the Tab button I am unable to access the pages options at the bottom left corner of the grid. After looking over your documentation I've seen that pressing ALT + Page Up or ALT + Page Down should allow me to move through the pages. Unfortunately this does not work and I'm unsure what may be causing this issue. Here is an example of my code.
@(Html.Kendo().Grid<AuthDTO.ListUserManagement>()
.Name("ManageUsersGrid")
.HtmlAttributes(new {style = " width:100%; height:86%"})
.Pageable()
.Pageable(pageable => pageable
.PageSizes(true)
.Messages(msg => msg.Display("{0:d0} - {1:d0} of {2:d0} items"))
.Refresh(true))
.Reorderable(reorder => reorder.Columns(true))
.Sortable(sort => sort.SortMode(GridSortMode.MultipleColumn))
.Filterable(ftb => ftb.Mode(GridFilterMode.Row))
.ColumnMenu()
.ColumnResizeHandleWidth(10)
.Resizable(resizable => resizable.Columns(true))
.Scrollable(o => o.Height("100%"))
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("GetUsers", "AppUser", new RouteValueDictionary {{"area", "AppUser"}}))
)
.Columns(columns =>
{
columns.Bound(o => o.Id)
.Filterable(false)
.Width(100)
.IncludeInMenu(false)
.Sortable(false)
.Title("Actions")
.ClientTemplate(
"# if(" + @ViewBag.DOD + " == 'true') { # +" +
"<a href=\"javascript: void(0);\" onclick=\"userEditItem('#: Id #');\" title=\"Edit\"><i class=\"disabled fa fa-pencil-square-o fa-lg\"></i><span class=\"sr-only\"></span></a>"
+ "# } else { # " +
"<a href=\"javascript: void(0);\" onclick=\"userEditItemCAC('#: Id #');\" title=\"Edit\"><i class=\"active fa fa-pencil-square-o fa-lg\"></i><span class=\"sr-only\"></span></a>"
+ "# } #" +
"<a href=\"javascript: void(0);\" onclick=\"impersonate('#: Id #');\" title=\"Impersonate User\"><i class=\"active fa fa-user fa-lg\"></i><span class=\"sr-only\"></span></a>"
);
columns.Bound(o => o.LastName)
.Width(200)
.Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));
columns.Bound(o => o.FirstName)
.Title("First Name")
.Width(200)
.Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));
columns.Bound(o => o.Email)
.Title("Email")
.Width(250)
.Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));
columns.Bound(o => o.Phone)
.Title("Phone")
.Width(250)
.Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));
columns.Bound(o => o.Organization)
.Title("Organization")
.Width(250)
.Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));
columns.Bound(o => o.Active)
.Title("Active")
.Width(100)
.Filterable(false);
columns.Bound(o => o.LockedAccount)
.Title("Locked Account")
.Width(100)
.Filterable(false);
columns.Bound(o => o.LockoutDateTime)
.Title("Lockout Date Time")
.Width(200);
})
)
Hello,
I have a problems with @(Html.Kendo().Editor() in Vistual Studio 2015 ASP.NET 5 MVC 6 beta 8 with "Kendo.Mvc : 2015.3.1111".
No overload for method '​Editor' takes 0 arguments
When will it be available?
Best Regards
Davide