or
var grid = $("#GridField").kendoGrid();function grid_selected(e) { var id; grid.select().each(function() { // CRASH HERE.. Doesent get a dataitem.
var dataItem = grid.dataItem($(this)); id = dataItem.SalonID; }) window.location.href = "@Url.Action("Details", "Salon")" + "/" + id;}<p>@(Html.Kendo().AutoComplete() .Name("searchField") .DataTextField("SalonName") .Filter("Contains") .Placeholder("Search..") .DataSource(dataSource => { dataSource.Read(read => { read.Action("GetAutoCompleteItems", "Salon"); }) .ServerFiltering(false); }) .Events(events => events.Change("autoComplete_selected")) ) </p> <div id="Grid">@(Html.Kendo().Grid(Model) .Name("GridField") .Columns(columns => { columns.Bound(item => item.SalonID); columns.Bound(item => item.Avtnr); columns.Bound(item => item.SalonName); columns.Bound(item => item.Street); columns.Bound(item => item.ZipCode); columns.Bound(item => item.City); columns.Bound(item => item.Telephone); columns.Bound(item => item.SalonEmail); columns.Bound(item => item.Description); columns.Bound(item => item.ContactPerson); }) .ColumnMenu() .Groupable() .Pageable() .Sortable() .Resizable(resize => resize.Columns(true)) .Selectable(selectable => selectable.Mode(GridSelectionMode.Single)) .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("Read", "Salon")) .ServerOperation(false) ) .Events(events => events.Change("grid_selected")))</div><script type="text/javascript">var grid = $("#GridField").kendoGrid();function grid_selected(e) { var id; grid.select().each(function() { var dataItem = grid.dataItem($(this));
// CRASH HERE.. Doesent get a dataitem.
id = dataItem.SalonID;
}) window.location.href = "@Url.Action("Details", "Salon")" + "/" + id;}// // Filter the grid when searching..// function autoComplete_selected(e) { var value = this.value(); if (value) { grid.data("kendoGrid").dataSource.filter({ field: "SalonName", operator: "contains", value: value }); } else { grid.data("kendoGrid").dataSource.filter({}); }}</script>][{"CostDriverCategoryId":2,"CostDriverCategoryName":"Chemicals","ShortName":null},{"CostDriverCategoryId":3,"CostDriverCategoryName":"Currency","ShortName":null}
function BindData (myArray){ $(document).ready(function() { $("#grid").kendoGrid({ dataSource: { data: myArray, pageSize: 10 }, change: onChange, selectable: "multiple", navigatable: true, groupable: true, sortable: true, pageable: { refresh: true, pageSizes: true }, columns: [ { field: "firstname", width: 90, title: "firstname:" }, { field: "lastname", width: 90, title: "lastname:" } ] }); }); } function onChange(arg) { var selected = $.map(this.select(), function(item) { return $(item).text(); }); ; sources.people.select(1) kendoConsole.log("Selected: " + selected.length + " item(s), [" + selected.join(", ") + "]"); }Hi,
I want to change the default text for update and cancel commands when inline editing (edit and destroy commands are not problem). How can I do that?
Also, is it possible to have both inline and popup editing in the same row (but with different commands) ?
Thanks
(sorry for my bad english:)