Let me lay out the desired functionality and see if y'all can help me.
I have a grid that uses inline editing. When a row is being edited, if the user then clicks the edit button on another row it switches the row edit, no matter if the current row has changed data or not. What I would like to happen is that the user cannot switch the editing row if it is dirty.
My initial thought was just use the BeforeEdit event and check if there was a currently edited row and preventDefault. Since the currently edited row switches before the BeforeEdit event is triggered this did not work.

Hi,
I'm trying to use autocomplete box for inline edit from gantt - grid. I'm not able to use the custom editor features available(like client template for column) that are available for grid.I would like to combine the autocomplete functionality with the inline edit functionality inside Grid. Is this possible and if so, how can I implement this?
Thanks

Hallo,
i'm trying to load a tabstrip header from database. I mean, the change Paris, New York etc with data from database. I have read this demo https://docs.telerik.com/aspnet-mvc/helpers/tabstrip/overview#model-binding
with the chapter "Model Binding". This is the source code
@model IEnumerable<rcMDM.Data.MN_DEF_REITER>
@(Html.Kendo().TabStrip()
.Name("reiterStrip")
.BindTo(Model,(item,label)=>
{ item.Text = label.RTR_LABEL; }) )
I have seen that the admins from this forum are from Bulgaria or they understand bulgarian, so below i want to explain my problem on bulgarian too :)
Здравейте,
имам малък проблем с табчетата. Правя една апликация, която трябва да зарежда динамична информация. Една от желанията ми е да използвам табовете. Искам да зареждам само самите наименования на табовете. Съдържанието като грид успях да го свържа и се зарежда, но не успях да направя същото с табовете. Ще съм много благодарен за помощта :)
Best wishes,

I have a Grid with Edit Pupup Custom Template and I need to transfer the data from the controller to the DropdownList. I need some help.
This is the part of my controler
_______________________
using OVFixedAssets.OVDataContext;
namespace OVFixedAssets.Controllers
{
public class FixedAssetsController : Controller
{
private OVFixedAssetsEntities db = new OVFixedAssetsEntities();
public JsonResult GetProjects([DataSourceRequest] DataSourceRequest request)
{
var oventities = new OVFixedAssetsEntities();
{
var projects = oventities.Projects.Select(project => new Project()
{
ProjectID = project.ProjectID,
ProjectName = project.ProjectName
});
return Json(projects, JsonRequestBehavior.AllowGet);
}
}
____________________________
Grid View
@(Html.Kendo().Grid<OVFixedAssets.OVDataContext.tblAssetsDetail>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(c => c.ProjectNo);
columns.Bound(c => c.AssetID);
columns.Bound(c => c.Item);
columns.Bound(c => c.Make);
columns.Bound(c => c.Model);
columns.Bound(c => c.SerialNumber);
columns.Bound(c => c.TagID);
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(175);
})
.HtmlAttributes(new {style = "height: 750px; Width:90%" })
.ToolBar(toolbar => {
toolbar.Create();
})
.ColumnMenu()
//.Editable(editable => editable.Mode(GridEditMode.PopUp))
.Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("FixedAssetDetails"))
.Resizable(resizable => resizable.Columns(true))
.Pageable( pageable => pageable
.Refresh(true)
.PageSizes(true)
.ButtonCount(5)
)
.Navigatable()
.Filterable()
.Scrollable()
.Events(events => {
events.ColumnResize("onColumnResize");
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(25)
.Model(model => model.Id(p => p.ID))
.Read(read => read.Action("tblAssetsDetails_Read", "FixedAssets"))
.Create(create => create.Action("tblAssetsDetails_Create", "FixedAssets"))
.Update(update => update.Action("tblAssetsDetails_Update", "FixedAssets"))
.Destroy(destroy => destroy.Action("tblAssetsDetails_Destroy", "FixedAssets"))
)
)
<script>
function onColumnResize(e){
//Implement the event handler for ColumnResize
}
</script>
_______________________________
EditTemplate
The edit template in inside Share\EditorTemplates
@using OVFixedAssets.Controllers
@model OVFixedAssets.OVDataContext.tblAssetsDetail
@{
ViewBag.Title = "Fixed Asset Details";
}
<p class="ovtitle1">Asset Details</p>
@(Html.Kendo()
.TabStrip()
.Name("tabstrip")
.Animation(animation => animation.Open(effect => effect.Fade(FadeDirection.In)))
.Items(tabstrip =>
{
tabstrip.Add()
.Text("Details")
.Selected(true)
.Content(@<text>
<div class="weather">
<div class="form-group">
<h5>Project No.</h5>
@*@(Html.Kendo()
.TextBoxFor(model => model.ProjectNo)
.Name("ProjectNo")
.HtmlAttributes(new { placeholder = "Project No.", required = "required", validationmessage = "Project Name", })
)*@
@(Html.Kendo().DropDownList()
.Name("ProjectsDropDownList")
.DataTextField("ProjectName")
.DataValueField("ProjectID")
.DataSource(source => { source.Read(read => { read.Action("GetProjects", "FixedAssets"); }); })
)
</div>
<div class="form-group">
<h5>Product Description</h5>
@(Html.Kendo()
.TextBoxFor(model => model.Item)
.Name("Item")
.HtmlAttributes(new { placeholder = "Item Description", required = "required", validationmessage = "Enter Asset Description", style = "width:500px" ,})
)
</div>
<div class="form-group">
<h5>Serial No.</h5>
@(Html.Kendo()
.TextBoxFor(model => model.SerialNumber)
.Name("SerialNumber")
.HtmlAttributes(new { placeholder = "Serial No." })
)
</div>
<div class="form-group">
<h5>Tag ID:</h5>
@(Html.Kendo()
.TextBoxFor(model => model.TagID)
.Name("TagID")
.HtmlAttributes(new { placeholder = "Tag ID." })
)
</div>
<div class="form-group">
<h5>Model No.</h5>
@(Html.Kendo()
.TextBoxFor(model => model.Model)
.Name("Model")
.HtmlAttributes(new { placeholder = "Model No." })
)
<div class="form-group">
<h5>Brand.</h5>
@(Html.Kendo()
.TextBoxFor(model => model.Make)
.Name("Make")
.HtmlAttributes(new { placeholder = "Brand Name." })
)
</div>
</div>
</div>
</text>);
tabstrip.Add()
.Text("Comments")
.Content(@<text>
<div class="weather">
<h5>Comments.</h5>
@(Html.Kendo()
.TextBoxFor(model => model.Comments)
.Name("Comments")
.HtmlAttributes(new { placeholder = "Comments" })
)
</div>
</text>);
tabstrip.Add()
.Text("Garantias")
.Content(@<text>
<div class="weather">
</div>
</text>);
tabstrip.Add()
.Text("Registro de Visitas")
.Content(@<text>
<div class="weather">
</div>
</text>);
})
)
</div>
-------------
I include some of the files.
Thanks...


Hallo,
I have a Data Grid with create, update and destroy functions. I have and database too. My Controller code for create function is:
public ActionResult Anlage_Create([DataSourceRequest] DataSourceRequest request, MN_ANLAGE anlage)
{
if (this.ModelState.IsValid)
{
using (var anlagen = new TestEntities1())
{
var entity = new MN_ANLAGE {
ANLAGEID = anlage.ANLAGEID,
ANLAGEART = anlage.ANLAGEART,
ANLAGEBETREIBER = anlage.ANLAGEBETREIBER,
// ANLAGEDATA= anlage.ANLAGEDATA, ANLAGENAME=anlage.ANLAGENAME,
ANLAGENUMMER=anlage.ANLAGENUMMER,
ANLAGESTATUS=anlage.ANLAGESTATUS,
TESTBOX = anlage.TESTBOX
};
anlagen.MN_ANLAGE.Add(entity);
anlagen.SaveChanges();
anlage.ANLAGEID = entity.ANLAGEID;
}
}
return Json(new[] { anlage }.ToDataSourceResult(request, ModelState));
}
It is possible to get the properties dynamic from the database in the var entity = new Anlage? Now when i change the database i must to change this method.
Thank in advance!
Kind regards,
Milen

I would like to get the selected values of the listbox in the POST method of my controller once the form is submitted but I haven't figured out how (it's always just coming in null). To help me out, how would I get the selected values of the "selected" listbox in the example here:
https://demos.telerik.com/aspnet-mvc/listbox
Thanks,
Dave

I have a question regarding an implementation.
So I have a table that supports versioning. The user has possibility to view all the versions and also has the possibility to delete the rows.
I have used the Destroy method from the telerik Grid but I have a question. The Destroy method on the demos returns the same list of rows that it was sent. Can this be used to return more rows that were delete than the ones sent?
So for instance let say I have 5 versions of my record in the grid. If I delete one of them can the Destroy method return all 5 records and the grid updates by removing all the 5 rows?
I would like to avoid doing a refresh on the grid. I should mention that I am not using pagination so it wouldn't be a problem.

Hello,
I'm having problems getting my grid to show the data I am passing to the datasource. Although the data is returned it's not displaying inth e gird, I simply get the message "No items to display". The data passed in is an array of Id's.
var testArray = [17, 18, 19]; function tabButton(e) { console.clear(); let grid = $("#grid").data("kendoGrid"); let filter = $(e).data("filter"); grid.dataSource.read({ array: testArray }); grid.refresh();}The controller conditionally handles the presence of an array retunring selected records where true and all records where false. This means that if there is no array of data it simply returns everything.
public ActionResult GetTabVessels(int[] array, [DataSourceRequest] DataSourceRequest request){ //Make a list List<Vessel> vessels = new List<Vessel>(); var vessel = unitOfWork.VesselRepository.Get(); DataSourceResult result = vessel.ToDataSourceResult(request); JsonResult data; if (array !=null) { //Populate list based on array of Id's foreach (var id in array) { vessels.Add(unitOfWork.VesselRepository.FindSingleOrDefault(x => x.Id == id)); } //Create Json variable for data source result. data = Json(vessels, JsonRequestBehavior.AllowGet); } else { data = Json(result, JsonRequestBehavior.AllowGet); } data.MaxJsonLength = int.MaxValue; return data;}This grid is straight forward enough
@(Html.Kendo().Grid<Force3Beta.ViewModels.VesselSearchResultsViewModel>().Name("VesselGrid").Columns(columns =>{ columns.Select().Width(50); columns.Bound(p => p.Name); columns.Bound(p => p.Type);}).Pageable().Sortable().Events(ev=>ev.Change("onChange")).PersistSelection().DataSource(dataSource => dataSource .Ajax() .Model(model => model.Id(p => p.Id)) .Read(read => read.Action("GetVessels", "Test"))))The array function is triggered with a button in the UI for the sake of testing. I can see in the network tab of the console that requested array of data is returned correctly, I can also see this in the controller as well, but for some reason the grid will not show it.
Can anyone help?
