Hi!
I've a inline editable Kendo Grid configured with a create button in the toolbar, paging is activated, the data are sorted and the datasource is an ajax datasource. This configuration generates multipe problems and I need a fix or a workaround for this, because I can't disable the sorting.
If I'm not on page 1 in the grid and I press the create button nothing happens. I can press the button multiple times and nothing happens. If I go back to the first page I have one empty data line for every pressed button in the grid. And it's not a javascript error.
Maybe it's possible to switch the page during pressing the create button but how?
If I've a sorting with no results in the grid and press the create button nothing happens too. After I clear the sorting I have one empty data entry for every pressed create button in the grid too.
I understand the technical reason and know about the workaround, but not the normal user. :-)
How I can handle the multipe button press?
Thank you for help!
@(Html.Kendo().ComboBoxFor(model => model.CountryId) .Filter(FilterType.Contains) .BindTo(ViewBag.Countries) .HtmlAttributes(CommonHelpers.MergeHtmlAttributes(Html.GetUnobtrusiveValidationAttributes( CommonHelpers.GetPropertyName(() => Model.CountryId)), new Dictionary<string, object>(){ { "class", "combobox-country" }})))<div> @(Html.Kendo().Grid(Model.UnitDetails) .Name("Grid") .DataSource(ds => ds .Ajax() .Read(read => read.Action("Index", "Home")) ) .HtmlAttributes(new { style = "height:430px;" }) .Columns(columns => { columns.Bound(p => p.UnitContract.Name).Title("Unit"); columns.Bound(p => p.UnitContract.CurrentRun.Operation.WellContract.Location).Title("Site"); columns.Bound(p => p.UnitContract.CurrentRun.Operation.WellContract.Name).Title("Well"); columns.Bound(p => p.UnitContract.CurrentRun.Id).Title("Run"); columns.Bound(p => p.UnitContract.CurrentRun.RunTask).Title("Task"); columns.Bound(p => p.UnitContract.CurrentRun.Operation.Description).Title("Operation"); columns.Bound(p => p.UnitContract.Status.StatusText).Title("Status"); columns.Bound(p => p.UnitContract.CurrentRun.LatestWellLogEntry.Depth).Title("Depth (m)"); columns.Bound(p => p.UnitContract.CurrentRun.LatestWellLogEntry.Speed).Title("Speed (m/min)"); columns.Bound(p => p.UnitContract.CurrentRun.LatestWellLogEntry.Tension).Title("Weight (kg)"); columns.Bound(p => p.UnitContract.CurrentRun.Name); columns.Template(p => { }).ClientTemplate(" ").Width(75); }) .ClientRowTemplate(Html.Partial("_ClientRowTemplate", Model).ToHtmlString()) .Pageable() .Scrollable(builder => builder.Height(250)) .Sortable())</div><tr> <td>#: UnitContract.Name# </td> <td>#: UnitContract.CurrentRun.Operation.WellContract.Location# </td> <td>#: UnitContract.CurrentRun.Operation.WellContract.Name# </td> <td>#: UnitContract.CurrentRun.Id# </td> <td>#: UnitContract.CurrentRun.RunTask# </td> <td>#: StatusMessage# </td> <td class='text-center'> <span class='label label-#:StatusColor #' style='width: 25px;'> </span> </td> <td> <div> @(Html.Kendo().Sparkline() .Name("depth") .Data(#: UnitContract.CurrentRun.LatestWellLogEntry.Speed#) .Type(SparklineType.Bar) .Tooltip(false) .ValueAxis(axis => axis.Numeric().Max(5000).Min(-5000).Visible(false)) .CategoryAxis(c => c.MajorTicks(ticks => ticks.Visible(false)) .Visible(true)) .ChartArea(ca => ca.Background("transparent")) .HtmlAttributes(new { style = "width: 75px;" })) </div> </td> <td> <div> <!-- DataWiz Sparkline --> </div> </td> <td> <div> <!-- DataWiz Sparkline --> </div> </td> <td>#: UnitContract.CurrentRun.Name# </td> <td> <form method='POST' action='@Url.Content("~/UnitDetails/Index/")#: UnitContract.Id#'> <input type='submit' class='k-button' value='Details' /> </form> </td></tr>